Ticket #14200: memoize.urlresolver.diff

File memoize.urlresolver.diff, 1.1 KB (added by Suor, 5 years ago)
  • django/core/handlers/base.py

     
    7373                # Setup default url resolver for this thread.
    7474                urlconf = settings.ROOT_URLCONF
    7575                urlresolvers.set_urlconf(urlconf)
    76                 resolver = urlresolvers.RegexURLResolver(r'^/', urlconf)
     76                resolver = urlresolvers.get_resolver(urlconf)
    7777
    7878                # Apply request middleware
    7979                for middleware_method in self._request_middleware:
     
    8585                    # Reset url resolver with a custom urlconf.
    8686                    urlconf = request.urlconf
    8787                    urlresolvers.set_urlconf(urlconf)
    88                     resolver = urlresolvers.RegexURLResolver(r'^/', urlconf)
     88                    resolver = urlresolvers.get_resolver(urlconf)
    8989
    9090                callback, callback_args, callback_kwargs = resolver.resolve(
    9191                        request.path_info)
Back to Top