Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #3187 -- Django will now look for the root URLconf as an attrib…

…ute of the request object, if available. This lets middleware override the urlconf as needed. Thanks, Fredrik Lundh.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4237 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit a5d3e0c3ef8975bfc8ab5bd4c13c27edab43b86b 1 parent 86870e7
Jacob Kaplan-Moss authored December 26, 2006

Showing 1 changed file with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. 5  django/core/handlers/base.py
5  django/core/handlers/base.py
@@ -60,7 +60,10 @@ def get_response(self, request):
60 60
             if response:
61 61
                 return response
62 62
 
63  
-        resolver = urlresolvers.RegexURLResolver(r'^/', settings.ROOT_URLCONF)
  63
+        # Get urlconf from request object, if available.  Otherwise use default.
  64
+        urlconf = getattr(request, "urlconf", settings.ROOT_URLCONF)
  65
+
  66
+        resolver = urlresolvers.RegexURLResolver(r'^/', urlconf)
64 67
         try:
65 68
             callback, callback_args, callback_kwargs = resolver.resolve(request.path)
66 69
 

0 notes on commit a5d3e0c

Please sign in to comment.
Something went wrong with that request. Please try again.