diff options
| author | Sylvain Fankhauser <sylvain.fankhauser@liip.ch> | 2015-06-05 15:30:03 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-07-03 12:06:40 -0400 |
| commit | f5d5867a4a6aeddd58ff855a01ab4e438d938ac1 (patch) | |
| tree | 73ecdbab94868fbd360f057d4dc192781bebfae6 /tests/middleware_exceptions/middleware.py | |
| parent | b91a2a499fd562011fd275238924baa6002fb1f8 (diff) | |
Fixed #24877 -- Added middleware handling of response.render() errors.
Diffstat (limited to 'tests/middleware_exceptions/middleware.py')
| -rw-r--r-- | tests/middleware_exceptions/middleware.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/middleware_exceptions/middleware.py b/tests/middleware_exceptions/middleware.py new file mode 100644 index 0000000000..944dd8910d --- /dev/null +++ b/tests/middleware_exceptions/middleware.py @@ -0,0 +1,8 @@ +from __future__ import unicode_literals + +from django.http import HttpResponse + + +class ProcessExceptionMiddleware(object): + def process_exception(self, request, exception): + return HttpResponse('Exception caught') |
