Ticket #13684: 13684_local_variable_resolver.1.diff

File 13684_local_variable_resolver.1.diff, 945 bytes (added by Antti Kaihola, 14 years ago)

moves default url resolver setup outside try..except

  • django/core/handlers/base.py

    diff --git a/django/core/handlers/base.py b/django/core/handlers/base.py
    index 79f6607..9af87d0 100644
    a b class BaseHandler(object):  
    6969        from django.conf import settings
    7070
    7171        try:
    72             try:
    73                 # Setup default url resolver for this thread.
    74                 urlconf = settings.ROOT_URLCONF
    75                 urlresolvers.set_urlconf(urlconf)
    76                 resolver = urlresolvers.RegexURLResolver(r'^/', urlconf)
     72            # Setup default url resolver for this thread.
     73            urlconf = settings.ROOT_URLCONF
     74            urlresolvers.set_urlconf(urlconf)
     75            resolver = urlresolvers.RegexURLResolver(r'^/', urlconf)
    7776
     77            try:
    7878                # Apply request middleware
    7979                for middleware_method in self._request_middleware:
    8080                    response = middleware_method(request)
Back to Top