Reputation: 2086
Errors caught by Django in DEBUG mode are returned in HTML-formatted code for browser display. I'd like to have those errors display in plain text (or JSON) instead. Is there a way to do that?
Upvotes: 5
Views: 751
Reputation: 8376
Not a direct solution, but perhaps throwing django-sentry into the mix would allow you to do something more with the errors reported? Im still new to it myself.
Upvotes: 1
Reputation: 1976
I think you could modify the templates found in this file: https://code.djangoproject.com/browser/django/trunk/django/views/debug.py
Change TECHNICAL_500_TEMPLATE
, TECHNICAL_404_TEMPLATE
, and EMPTY_URLCONF_TEMPLATE
to display plaintext.
Upvotes: 1