Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#998 closed defect (fixed)

Exception in views/

Reported by: andy@… Owned by: Adrian Holovaty
Component: Core (Other) Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


There's an error in the get_template_exception_info function that causes the interpreter to raise an UnboundLocalError in the marginal case that the template being debugged has only one line. This is caused by the before, during and after variables not being assigned. This can be fixed by inserting the line

before = during = after = ""

...before the for loop (line 26, django/views/

This bug is present in revision 1550.

Change History (1)

comment:1 Changed 13 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(In [1578]) Fixed #998 -- Fixed edge-case bug in debug view for templates with only one line. Thanks, andy@…

Note: See TracTickets for help on using tickets.
Back to Top