From 00391b81f366cb0ac00b953e59616bc23c5a43bf Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Fri, 27 Apr 2018 01:53:22 -0500 Subject: [PATCH] More general solution --- readthedocs/core/middleware.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/readthedocs/core/middleware.py b/readthedocs/core/middleware.py index 09f0a4758a0..732e93a86d1 100644 --- a/readthedocs/core/middleware.py +++ b/readthedocs/core/middleware.py @@ -54,9 +54,6 @@ def process_request(self, request): 'PRODUCTION_DOMAIN', 'readthedocs.org' ) - # Django sets the urlconf for the current thread - # so we need to set this again later. - self.current_urlconf = get_urlconf() if public_domain is None: public_domain = production_domain @@ -137,7 +134,7 @@ def process_request(self, request): def process_response(self, request, response): # Reset URLconf for this thread # to the original one. - set_urlconf(self.current_urlconf) + set_urlconf(None) return response