diff --git a/django/views/debug.py b/django/views/debug.py index e5baf91662..b08a56a524 100644 --- a/django/views/debug.py +++ b/django/views/debug.py @@ -255,6 +255,7 @@ TECHNICAL_500_TEMPLATE = """ hideAll(getElementsByClassName(document, 'table', 'vars')); hideAll(getElementsByClassName(document, 'ol', 'pre-context')); hideAll(getElementsByClassName(document, 'ol', 'post-context')); + hideAll(getElementsByClassName(document, 'div', 'pastebin')); } function toggle() { for (var i = 0; i < arguments.length; i++) { @@ -273,6 +274,13 @@ TECHNICAL_500_TEMPLATE = """ s.innerHTML = s.innerHTML == uarr ? darr : uarr; return false; } + function switchPastebinFriendly(link) { + s1 = "Switch to copy-and-paste view"; + s2 = "Switch back to interactive view"; + link.innerHTML = link.innerHTML == s1 ? s2 : s1; + toggle('browserTraceback', 'pastebinTraceback'); + return false; + } //--> @@ -341,47 +349,71 @@ TECHNICAL_500_TEMPLATE = """ {% endif %}
{{ frame.filename }}
in {{ frame.function }}
+
+ {{ frame.filename }}
in {{ frame.function }}
- {% if frame.context_line %}
- Variable | -Value | -
---|
{{ var.0 }} | -{{ var.1|pprint|escape }} |
+ Variable | +Value |
---|
+
+Traceback (most recent call last):
+ |
+