#28618: There should be a way to make Templates substitution to raise an
exception
on error
-------------------------------------+-------------------------------------
Reporter: Facundo Batista | Owner: shreyas
Type: New feature | Status: assigned
Component: Template system | Version: 1.11
Severity: Normal | Resolution:
Keywords: template error | Triage Stage:
substitution | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Facundo Batista):
Yes, a string can be fixed so if a substitution fails, that can be
searched in the test.
But that would imply to remember on EVERY test to check if that string
exists (or change your testing infrastructure to assert that on all
tests...).
In the spirit of "Errors should never pass silently" I think it would be
useful to have a parameter like Engine(...,
exception_on_missing_substitution=True) with default to False, so any
missing substitution would explicitly make the test fail, without the
developer needing to remember anything...
--
Ticket URL: <https://code.djangoproject.com/ticket/28618#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/072.57516b5e829426188b17d9f3ac159a00%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.