Ticket #12250: django-base-handlers-view-middleware.patch
File django-base-handlers-view-middleware.patch, 1.2 KB (added by , 15 years ago) |
---|
-
django/core/handlers/base.py
89 89 callback, callback_args, callback_kwargs = resolver.resolve( 90 90 request.path_info) 91 91 92 # Apply view middleware 93 for middleware_method in self._view_middleware: 94 response = middleware_method(request, callback, callback_args, callback_kwargs) 95 if response: 96 return response 92 try: 93 # Apply view middleware 94 for middleware_method in self._view_middleware: 95 response = middleware_method(request, callback, callback_args, callback_kwargs) 96 if response: 97 return response 97 98 98 try:99 99 response = callback(request, *callback_args, **callback_kwargs) 100 100 except Exception, e: 101 101 # If the view raised an exception, run it through exception