Code

Ticket #13684: django-core-handlers-base-1.diff

File django-core-handlers-base-1.diff, 910 bytes (added by brendoncrawford, 4 years ago)
Line 
1--- django/core/handlers/base.py        2010-06-05 18:47:40.000000000 -0700
2+++ django/core/handlers/base.py        2010-06-05 18:48:12.000000000 -0700
3@@ -69,12 +69,12 @@ class BaseHandler(object):
4         from django.conf import settings
5 
6         try:
7-            try:
8-                # Setup default url resolver for this thread.
9-                urlconf = settings.ROOT_URLCONF
10-                urlresolvers.set_urlconf(urlconf)
11-                resolver = urlresolvers.RegexURLResolver(r'^/', urlconf)
12+            # Setup default url resolver for this thread.
13+            urlconf = settings.ROOT_URLCONF
14+            urlresolvers.set_urlconf(urlconf)
15+            resolver = urlresolvers.RegexURLResolver(r'^/', urlconf)
16 
17+            try:
18                 # Apply request middleware
19                 for middleware_method in self._request_middleware:
20                     response = middleware_method(request)