debug.py fails to render
|Reported by:||anonymous||Owned by:||adrian|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Sometimes when django is unable to find the correct location for an error,
it just dumps a stack trace instead of showing the more informative debug page.
The problem is in views/debug.py, setting the lastframe to the last element of the frames list,
which happens to be empty if no frame could be found.
A trivial patch solving the problem is attached.