Ticket #6228: 6941_common_middleware_urlresolver.patch
File 6941_common_middleware_urlresolver.patch, 1011 bytes (added by , 17 years ago) |
---|
-
django/middleware/common.py
54 54 # trailing slash and there is no pattern for the current path 55 55 if settings.APPEND_SLASH and (not old_url[1].endswith('/')): 56 56 try: 57 urlresolvers.resolve(request.path )57 urlresolvers.resolve(request.path, getattr(request, 'urlconf', None)) 58 58 except urlresolvers.Resolver404: 59 59 new_url[1] = new_url[1] + '/' 60 60 if settings.DEBUG and request.method == 'POST': … … 69 69 if new_url != old_url: 70 70 # Redirect if the target url exists 71 71 try: 72 urlresolvers.resolve(new_url[1] )72 urlresolvers.resolve(new_url[1], getattr(request, 'urlconf', None)) 73 73 except urlresolvers.Resolver404: 74 74 pass 75 75 else: