From 046d943148e82c4f2a9a164b6bfceb8c7dda2608 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Sun, 3 Feb 2008 01:24:40 +0000 Subject: [PATCH] Fixed #6495 -- Fixed debug traceback HTML output in the rare case when there is no source line to display. Thanks, Bastian Kleineidam. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7057 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/views/debug.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/views/debug.py b/django/views/debug.py index e3be2a7dcd..5f6f17d016 100644 --- a/django/views/debug.py +++ b/django/views/debug.py @@ -431,11 +431,11 @@ TECHNICAL_500_TEMPLATE = """ {% if frame.context_line %}
{% if frame.pre_context %} -
    {% for line in frame.pre_context %}
  1. {{ line|escape }}
  2. {% endfor %}
+
    {% for line in frame.pre_context %}{% if line %}
  1. {{ line|escape }}
  2. {% endif %}{% endfor %}
{% endif %}
  1. {{ frame.context_line|escape }} ...
{% if frame.post_context %} -
    {% for line in frame.post_context %}
  1. {{ line|escape }}
  2. {% endfor %}
+
    {% for line in frame.post_context %}{% if line %}
  1. {{ line|escape }}
  2. {% endif %}{% endfor %}
{% endif %}
{% endif %}