Error page should not invoke callables passed through WSGI META structure
|Reported by:||ericbuehl||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||yes|
WSGI servers such as Werkzeug pass callable methods that should NOT be called when the META structure is printed in places such as the debug response handler. http://werkzeug.pocoo.org/docs/serving/#shutting-down-the-server
When a Django view throws an error (with DEBUG=True) and is hosted by Werkzeug, it causes the server to silently shut down because the Django error page is blindly calling the shutdown method in order to pretty print the result for the error page.
I have included a pull request that I believe addresses this issue: https://github.com/django/django/pull/1546