defaults.server_error(request, template_name='500.html')
Similarly, Django executes special-case behavior in the case of runtime errors in view code. If a view results in an exception, Django will, by default, call the view django.views.defaults.server_error, which either produces a very simple “Server Error” message or loads and renders the template 500.html if you created it in your root template directory.
The default 500 view passes no variables to the 500.html template and is rendered with an empty Context to lessen the chance of additional errors.
If DEBUG is set to True (in your settings module), then your 500 view will never be used, and the traceback will be displayed instead, with some debug information.
Passing a nonexistent template_name will raise TemplateDoesNotExist.
Please login to continue.