Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

small fix to the template_debug stuff, it was dropping last character…

…s and didn't split the first line correctly

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1403 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit f0fbd43a57b8a391915099e49c1ed3e3089331c9 1 parent 18c7ed7
Georg Bauer authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 django/views/debug.py
View
5 django/views/debug.py
@@ -23,14 +23,13 @@ def get_template_exception_info(exc_type, exc_value, tb):
upto = 0
source_lines = []
linebreaks = izip(count(0), linebreak_iter(template_source))
- linebreaks.next() # skip the nothing before initial line start
for num, next in linebreaks:
if start >= upto and end <= next:
line = num
before = escape(template_source[upto:start])
during = escape(template_source[start:end])
- after = escape(template_source[end:next - 1])
- source_lines.append( (num, escape(template_source[upto:next - 1])) )
+ after = escape(template_source[end:next])
+ source_lines.append( (num, escape(template_source[upto:next])) )
upto = next
total = len(source_lines)
Please sign in to comment.
Something went wrong with that request. Please try again.