mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	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
This commit is contained in:
		| @@ -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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user