mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #26601 -- Improved middleware per DEP 0005.
Thanks Tim Graham for polishing the patch, updating the tests, and writing documentation. Thanks Carl Meyer for shepherding the DEP.
This commit is contained in:
committed by
Tim Graham
parent
05c888ffb8
commit
9baf692a58
@@ -1,8 +1,10 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.http import HttpResponse
|
||||
from django.utils.deprecation import MiddlewareMixin
|
||||
|
||||
|
||||
class ProcessExceptionMiddleware(object):
|
||||
class ProcessExceptionMiddleware(MiddlewareMixin):
|
||||
|
||||
def process_exception(self, request, exception):
|
||||
return HttpResponse('Exception caught')
|
||||
|
||||
Reference in New Issue
Block a user