Suppressing exceptions in templates harmful for debugging
|Reported by:||Owned by:||Luke Plant|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Even when TEMPLATE_DEBUG is enabled, Django will currently silently suppress all exceptions during template rendering.
This makes it hard to find typos in the template (misspelled variable names), but can also hide other errors.
The concrete problem I hit was the conversion to permalink and the resolver not knowing functions specified directly as object and not string.
As the exception was ignored, all users of the permalink used the empty string.
It would be nice if the exceptions can be easily logged either to stderr (manage.py runserver) or some file, potentially using another debug option in settings.py.