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 w