﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
31780	Include the Python traceback in the debug-page footer as a HTML comment	Tom Forbes	nobody	"It would be very handy to include the traceback that triggered the Django debug page inside a HTML comment in the footer of the page. Quite often you might get a debug-page HTML output from tests or other places where it is inconvenient to try and find the actual cause of the exception - you have to page up through many kilobytes of HTML content to find the cause of the exception.

If we can include just a raw Python traceback in the footer of the debug page as a HTML comment then this will be immediately discoverable in such situations. `print(html_response)` and `curl` would both show it without needing any scrolling or grepping. 

As a concrete example:


{{{
print(html)
.... lots of text

</div>
  <div id=""explanation"">
    <p>
      You’re seeing this error because you have <code>DEBUG = True</code> in your
      Django settings file. Change that to <code>False</code>, and Django will
      display a standard page generated by the handler for this status code.
    </p>
  </div>
<!--
Traceback (most recent call last):
  File ""/path/to/example.py"", line 4, in <module>
    greet('Chad')
  File ""/path/to/example.py"", line 2, in greet
    print('Hello, ' + someon)
NameError: name 'someon' is not defined
-->
</body>
</html>
}}}
"	New feature	new	Uncategorized	dev	Normal		technical_500_response		Unreviewed	0	0	0	0	1	0
