diff options
| author | Georg Bauer <gb@hugo.westfalen.de> | 2005-11-24 22:57:04 +0000 |
|---|---|---|
| committer | Georg Bauer <gb@hugo.westfalen.de> | 2005-11-24 22:57:04 +0000 |
| commit | f0fbd43a57b8a391915099e49c1ed3e3089331c9 (patch) | |
| tree | 0b04b6710741d8358664619bf5aa73f393150335 /django/views/debug.py | |
| parent | 18c7ed74e4fbdde9cb839a4031b8683053d97952 (diff) | |
small fix to the template_debug stuff, it was dropping last characters and didn't split the first line correctly
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1403 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/views/debug.py')
| -rw-r--r-- | django/views/debug.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/django/views/debug.py b/django/views/debug.py index 1eee80b9d6..5371af9f5c 100644 --- a/django/views/debug.py +++ b/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) |
