Django

Code

Ticket #998 (closed: fixed)

Opened 3 years ago

Last modified 2 years ago

Exception in views/debug.py

Reported by: andy@jadedplanet.net Assigned to: adrian
Milestone: Component: Core framework
Version: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

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/debug.py).

This bug is present in revision 1550.

Attachments

Change History

12/08/05 20:36:56 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #998 (Exception in views/debug.py)




Change Properties
Action