#25423: Using custom tag without {% load %} result in confusing traceback
--------------------------------------+------------------------------------
Reporter: yegle | Owner: chiller
Type: Cleanup/optimization | Status: assigned
Component: Template system | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by pindia):
* has_patch: 0 => 1
Comment:
I did some experimentation with this and it looks like it's not possible
to distinguish between a truly unknown template tag and a template tag
that isn't registered as a starting tag but might be an ending tag (like
`elif`, `endif`, etc). That's why the error message lists some "expected"
tags.
However I do have personal experience with Django users who have been very
confused by this message and didn't even think to check if they had loaded
the tag. I think your "Did you forgot to register or load this tag?"
message is a good solution. I've created a patch and PR to add that to the
error message: https://github.com/django/django/pull/5392
--
Ticket URL: <https://code.djangoproject.com/ticket/25423#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/063.0fffba53a9ed6da26444ad8352385c8e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.