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
This commit is contained in:
Adrian Holovaty 2005-12-09 02:35:38 +00:00
parent 99f0f414d5
commit d06a12406b
2 changed files with 2 additions and 0 deletions

View File

@ -37,6 +37,7 @@ answer newbie questions, and generally made Django that much better:
Paul Bissex <http://e-scribe.com/>
Simon Blanchard
Andrew Brehaut <http://brehaut.net/blog>
andy@jadedplanet.net
Antonio Cavedoni <http://cavedoni.com/>
C8E
Amit Chakradeo <http://amit.chakradeo.net/>

View File

@ -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