# HG changeset patch
# User Brodie Rao <brodie@bitheap.org>
# Date 1291447118 -39600
# Node ID e08464eca04c6a8ce8c09dc029e8b287a5291903
# Parent 13313f7437014b6471374941a2ce43cf2232c5e3
Improved pretty-printing of the debug exception template
diff --git a/django/views/debug.py b/django/views/debug.py
a
|
b
|
TECHNICAL_500_TEMPLATE = """
|
324 | 324 | table.vars { margin:5px 0 2px 40px; } |
325 | 325 | table.vars td, table.req td { font-family:monospace; } |
326 | 326 | table td.code { width:100%; } |
327 | | table td.code div { overflow:hidden; } |
| 327 | table td.code pre { overflow:hidden; } |
328 | 328 | table.source th { color:#666; } |
329 | 329 | table.source td { font-family:monospace; white-space:pre; border-bottom:1px solid #eee; } |
330 | 330 | ul.traceback { list-style-type:none; } |
… |
… |
TECHNICAL_500_TEMPLATE = """
|
448 | 448 | </tr> |
449 | 449 | <tr> |
450 | 450 | <th>Python Path:</th> |
451 | | <td>{{ sys_path }}</td> |
| 451 | <td><pre>{{ sys_path|pprint }}</pre></td> |
452 | 452 | </tr> |
453 | 453 | <tr> |
454 | 454 | <th>Server time:</th> |
… |
… |
TECHNICAL_500_TEMPLATE = """
|
533 | 533 | {% for var in frame.vars|dictsort:"0" %} |
534 | 534 | <tr> |
535 | 535 | <td>{{ var.0|force_escape }}</td> |
536 | | <td class="code"><div>{{ var.1|pprint|force_escape }}</div></td> |
| 536 | <td class="code"><pre>{{ var.1|pprint|force_escape }}</pre></td> |
537 | 537 | </tr> |
538 | 538 | {% endfor %} |
539 | 539 | </tbody> |
… |
… |
Exception Value: {{ exception_value|forc
|
606 | 606 | {% for var in request.GET.items %} |
607 | 607 | <tr> |
608 | 608 | <td>{{ var.0 }}</td> |
609 | | <td class="code"><div>{{ var.1|pprint }}</div></td> |
| 609 | <td class="code"><pre>{{ var.1|pprint }}</pre></td> |
610 | 610 | </tr> |
611 | 611 | {% endfor %} |
612 | 612 | </tbody> |
… |
… |
Exception Value: {{ exception_value|forc
|
628 | 628 | {% for var in request.POST.items %} |
629 | 629 | <tr> |
630 | 630 | <td>{{ var.0 }}</td> |
631 | | <td class="code"><div>{{ var.1|pprint }}</div></td> |
| 631 | <td class="code"><pre>{{ var.1|pprint }}</pre></td> |
632 | 632 | </tr> |
633 | 633 | {% endfor %} |
634 | 634 | </tbody> |
… |
… |
Exception Value: {{ exception_value|forc
|
649 | 649 | {% for var in request.FILES.items %} |
650 | 650 | <tr> |
651 | 651 | <td>{{ var.0 }}</td> |
652 | | <td class="code"><div>{{ var.1|pprint }}</div></td> |
| 652 | <td class="code"><pre>{{ var.1|pprint }}</pre></td> |
653 | 653 | </tr> |
654 | 654 | {% endfor %} |
655 | 655 | </tbody> |
… |
… |
Exception Value: {{ exception_value|forc
|
672 | 672 | {% for var in request.COOKIES.items %} |
673 | 673 | <tr> |
674 | 674 | <td>{{ var.0 }}</td> |
675 | | <td class="code"><div>{{ var.1|pprint }}</div></td> |
| 675 | <td class="code"><pre>{{ var.1|pprint }}</pre></td> |
676 | 676 | </tr> |
677 | 677 | {% endfor %} |
678 | 678 | </tbody> |
… |
… |
Exception Value: {{ exception_value|forc
|
693 | 693 | {% for var in request.META.items|dictsort:"0" %} |
694 | 694 | <tr> |
695 | 695 | <td>{{ var.0 }}</td> |
696 | | <td class="code"><div>{{ var.1|pprint }}</div></td> |
| 696 | <td class="code"><pre>{{ var.1|pprint }}</pre></td> |
697 | 697 | </tr> |
698 | 698 | {% endfor %} |
699 | 699 | </tbody> |
… |
… |
Exception Value: {{ exception_value|forc
|
712 | 712 | {% for var in settings.items|dictsort:"0" %} |
713 | 713 | <tr> |
714 | 714 | <td>{{ var.0 }}</td> |
715 | | <td class="code"><div>{{ var.1|pprint }}</div></td> |
| 715 | <td class="code"><pre>{{ var.1|pprint }}</pre></td> |
716 | 716 | </tr> |
717 | 717 | {% endfor %} |
718 | 718 | </tbody> |