Ticket #11378: patch
File patch, 1.3 KB (added by , 16 years ago) |
---|
-
base.py
68 68 from django.core import exceptions, urlresolvers 69 69 from django.conf import settings 70 70 71 # Apply request middleware 72 for middleware_method in self._request_middleware: 73 response = middleware_method(request) 74 if response: 75 return response 71 try: 72 # Apply request middleware 73 for middleware_method in self._request_middleware: 74 response = middleware_method(request) 75 if response: 76 return response 76 77 77 # Get urlconf from request object, if available. Otherwise use default.78 urlconf = getattr(request, "urlconf", settings.ROOT_URLCONF)78 # Get urlconf from request object, if available. Otherwise use default. 79 urlconf = getattr(request, "urlconf", settings.ROOT_URLCONF) 79 80 80 resolver = urlresolvers.RegexURLResolver(r'^/', urlconf)81 try: 81 resolver = urlresolvers.RegexURLResolver(r'^/', urlconf) 82 82 83 callback, callback_args, callback_kwargs = resolver.resolve( 83 84 request.path_info) 84 85