"source" exception attribute no longer handled properly by debug exception handler
|Reported by:||Glenn||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The "source" attribute on exceptions handled by the debug view was very handy; I set it in my own custom templating system (which coexists with Django's) and it automatically showed up in errors generated by Django's, complete with line numbers, just like they do for when Django templates set that attribute. Duck typing made this work implicitly, which was extremely useful--that's how duck typing is supposed to work.
r12586 broke this, adding an isinstance check which makes it so only errors from Django's own templates can use this feature. This doesn't make sense; duck typing was the correct approach here.
Please revert r12586; that was an unnecessarily destructive change. If you're having namespace collisions, then use a less generic name ("source_with_lines" or something like that).
Change History (12)
comment:1 Changed 4 years ago by Alex
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted
- Version changed from 1.1 to SVN