[Django]-Django not displaying error traceback to browser – just 500 page

2👍

The following is required in settings module in order to display diagnostic page after errors:

  • DEBUG is True
  • The client (web browser) is connected from localhost or from any IP address listed in INTERNAL_IPS.
  • The variable TEMPLATE_CONTEXT_PROCESSORS contains "django.core.context_processors.debug" or is left on the default value.

You can distinguish the web server’s error 500 page from Django’s error page easy by different text like this:
“… There’s been an error. It’s been reported…” (This is from the default template.)
if you do import handler500 from django.conf.urls (or django.conf.urls.defaults in old Django) in the main urlconf.

2👍

You could have an error in your middleware in process_request before you can get to the error page. Although, that you could access some pages would suggest that this is not the problem.

1👍

try this instead:

set DEBUG = True
TEMPLATE_DEBUG = DEBUG

-1👍

comment DEBUG_PROPAGATE_EXCEPTIONS=True, this should work. Please try.

👤nyk91

Leave a comment