diff --git a/django/views/templates/technical_500.html b/django/views/templates/technical_500.html index 57d07eb933..f0cadf03bd 100644 --- a/django/views/templates/technical_500.html +++ b/django/views/templates/technical_500.html @@ -278,7 +278,7 @@ {% endfor %} -
+ {% if not is_email %}
diff --git a/tests/view_tests/tests/test_debug.py b/tests/view_tests/tests/test_debug.py index 1ce4f3f800..3cbeb2e03a 100644 --- a/tests/view_tests/tests/test_debug.py +++ b/tests/view_tests/tests/test_debug.py @@ -401,6 +401,19 @@ class ExceptionReporterTests(SimpleTestCase): self.assertIn('

Request information

', html) self.assertIn('

Request data not supplied

', html) + def test_sharing_traceback(self): + try: + raise ValueError('Oops') + except ValueError: + exc_type, exc_value, tb = sys.exc_info() + reporter = ExceptionReporter(None, exc_type, exc_value, tb) + html = reporter.get_traceback_html() + self.assertIn( + '', + html, + ) + def test_eol_support(self): """The ExceptionReporter supports Unix, Windows and Macintosh EOL markers""" LINES = ['print %d' % i for i in range(1, 6)]