From b0d380376c110d13c27b8dd3320175b050eed74f Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Tue, 8 Jul 2008 01:49:50 +0000 Subject: [PATCH] Fixed #7649 -- Fixed incorrect line numbering in debug view in case of empty spaces. Thanks, dusk git-svn-id: http://code.djangoproject.com/svn/django/trunk@7863 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 a118ac3126..4fc4cd5cd2 100644 --- a/django/views/debug.py +++ b/django/views/debug.py @@ -450,11 +450,11 @@ TECHNICAL_500_TEMPLATE = """ {% if frame.context_line %}
{% if frame.pre_context %} -
    {% for line in frame.pre_context %}{% if line %}
  1. {{ line|escape }}
  2. {% endif %}{% endfor %}
+
    {% for line in frame.pre_context %}
  1. {{ line|escape }}
  2. {% endfor %}
{% endif %}
  1. {{ frame.context_line|escape }} ...
{% if frame.post_context %} -
    {% for line in frame.post_context %}{% if line %}
  1. {{ line|escape }}
  2. {% endif %}{% endfor %}
+
    {% for line in frame.post_context %}
  1. {{ line|escape }}
  2. {% endfor %}
{% endif %}
{% endif %}