diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-10-10 13:51:58 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-10-10 13:51:58 +0000 |
| commit | f258a8fce28ca65f2cfb3798b36f262c65639190 (patch) | |
| tree | c682966f03fc661eb009cd241ac62ce999282763 /django/utils | |
| parent | 22bbdc633cc987a4875ec86088489b3e0b0a4cea (diff) | |
Fixed #600 -- decorator_from_middleware now handles process_view. Thanks, Hugo
git-svn-id: http://code.djangoproject.com/svn/django/trunk@820 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils')
| -rw-r--r-- | django/utils/decorators.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/django/utils/decorators.py b/django/utils/decorators.py index b21a4e4248..1333f9da88 100644 --- a/django/utils/decorators.py +++ b/django/utils/decorators.py @@ -12,6 +12,10 @@ def decorator_from_middleware(middleware_class): 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) |
