mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #14588 -- Corrected r14393 to ensure that response middlewares are are always applied. Includes a battery of tests to validate the expected behavior of the middleware cycle. Thanks to Petr Marhoun for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14398 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -1,4 +1,17 @@
|
||||
from django import http
|
||||
from django.core.exceptions import PermissionDenied
|
||||
|
||||
def index(request):
|
||||
return http.HttpResponse('')
|
||||
def normal_view(request):
|
||||
return http.HttpResponse('OK')
|
||||
|
||||
def not_found(request):
|
||||
raise http.Http404()
|
||||
|
||||
def server_error(request):
|
||||
raise Exception('Error in view')
|
||||
|
||||
def null_view(request):
|
||||
return None
|
||||
|
||||
def permission_denied(request):
|
||||
raise PermissionDenied()
|
||||
|
||||
Reference in New Issue
Block a user