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?
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With