Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #600 -- decorator_from_middleware now handles process_view. Tha…

…nks, Hugo

git-svn-id: http://code.djangoproject.com/svn/django/trunk@820 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit f258a8fce28ca65f2cfb3798b36f262c65639190 1 parent 22bbdc6
@adrianholovaty adrianholovaty authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 django/utils/decorators.py
View
4 django/utils/decorators.py
@@ -12,6 +12,10 @@ def _wrapped_view(request, *args, **kwargs):
result = middleware.process_request(request)
if result is not None:
return result
+ if hasattr(middleware, 'process_view'):
+ result = middleware.process_view(request, view_func, **kwargs)
+ if result is not None:
+ return result
response = view_func(request, *args, **kwargs)
if hasattr(middleware, 'process_response'):
result = middleware.process_response(request, response)
Please sign in to comment.
Something went wrong with that request. Please try again.