mirror of
https://github.com/django/django.git
synced 2025-07-19 03:05:32 +00:00
Tested a middleware's process_template_response() returning None.
This commit is contained in:
parent
bff5ccff75
commit
ced0bdd923
2 changed files with 14 additions and 0 deletions
|
@ -58,6 +58,11 @@ class LogMiddleware(BaseMiddleware):
|
|||
return response
|
||||
|
||||
|
||||
class NoTemplateResponseMiddleware(BaseMiddleware):
|
||||
def process_template_response(self, request, response):
|
||||
return None
|
||||
|
||||
|
||||
class NotFoundMiddleware(BaseMiddleware):
|
||||
def __call__(self, request):
|
||||
raise Http404('not found')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue