#31780: Include the Python traceback in the debug-page footer as a HTML comment -------------------------------------+------------------------------------- Reporter: Tom Forbes | Owner: nobody Type: New feature | Status: closed Component: Core (Other) | Version: master Severity: Normal | Resolution: wontfix Keywords: | Triage Stage: technical_500_response | Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 1 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by Carlton Gibson): Hi Tom. I appreciate the pain in deciphering HTML in the middle of a failing test case. In any case where you're able to `print(html_response)` you should also be also to inspect [https://docs.djangoproject.com/en/3.0/topics/testing/tools/#django.test.Response.exc_info `exc_info`] which will also give you access to the exception (and the traceback) directly. (If the TestClient should annotate responses with **more info**, this seems a much better way to go than, sorry-for-the-wording, littering the 500 template.) Remember too, that you can set any Accepts header other than `text/html` to get a plain text error response. In the curl case, piping into less and using searching for "Traceback " doesn't strike me as too burdensome... I hope that makes sense. -- Ticket URL: <https://code.djangoproject.com/ticket/31780#comment:5> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/061.51d2346e9bea1b67a329386a0d4bde69%40djangoproject.com.