mirror of https://github.com/django/django.git
Fixed #32087 -- Made technical 500 debug page use HTTPS for sharing traceback.
This commit is contained in:
parent
f1f24539d8
commit
079deba530
|
@ -278,7 +278,7 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<form action="http://dpaste.com/" name="pasteform" id="pasteform" method="post">
|
<form action="https://dpaste.com/" name="pasteform" id="pasteform" method="post">
|
||||||
{% if not is_email %}
|
{% if not is_email %}
|
||||||
<div id="pastebinTraceback" class="pastebin">
|
<div id="pastebinTraceback" class="pastebin">
|
||||||
<input type="hidden" name="language" value="PythonConsole">
|
<input type="hidden" name="language" value="PythonConsole">
|
||||||
|
|
|
@ -401,6 +401,19 @@ class ExceptionReporterTests(SimpleTestCase):
|
||||||
self.assertIn('<h2>Request information</h2>', html)
|
self.assertIn('<h2>Request information</h2>', html)
|
||||||
self.assertIn('<p>Request data not supplied</p>', html)
|
self.assertIn('<p>Request data not supplied</p>', 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(
|
||||||
|
'<form action="https://dpaste.com/" name="pasteform" '
|
||||||
|
'id="pasteform" method="post">',
|
||||||
|
html,
|
||||||
|
)
|
||||||
|
|
||||||
def test_eol_support(self):
|
def test_eol_support(self):
|
||||||
"""The ExceptionReporter supports Unix, Windows and Macintosh EOL markers"""
|
"""The ExceptionReporter supports Unix, Windows and Macintosh EOL markers"""
|
||||||
LINES = ['print %d' % i for i in range(1, 6)]
|
LINES = ['print %d' % i for i in range(1, 6)]
|
||||||
|
|
Loading…
Reference in New Issue