From d06a12406bb921ce58e9dd37989a8b584640a1d3 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Fri, 9 Dec 2005 02:35:38 +0000 Subject: [PATCH] Fixed #998 -- Fixed edge-case bug in debug view for templates with only one line. Thanks, andy@jadedplanet.net git-svn-id: http://code.djangoproject.com/svn/django/trunk@1578 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- AUTHORS | 1 + django/views/debug.py | 1 + 2 files changed, 2 insertions(+) diff --git a/AUTHORS b/AUTHORS index af26d71d288..77f6240b442 100644 --- a/AUTHORS +++ b/AUTHORS @@ -37,6 +37,7 @@ answer newbie questions, and generally made Django that much better: Paul Bissex Simon Blanchard Andrew Brehaut + andy@jadedplanet.net Antonio Cavedoni C8E Amit Chakradeo diff --git a/django/views/debug.py b/django/views/debug.py index 256f7cd662a..c7a4e6bf7d6 100644 --- a/django/views/debug.py +++ b/django/views/debug.py @@ -23,6 +23,7 @@ def get_template_exception_info(exc_type, exc_value, tb): line = 0 upto = 0 source_lines = [] + before = during = after = "" for num, next in enumerate(linebreak_iter(template_source)): if start >= upto and end <= next: line = num