#17070: newly created templatetags module not loaded or recognized until server
restart
----------------------------------+------------------------------------
Reporter: UltraAyla | Owner: nobody
Type: Bug | Status: reopened
Component: Template system | Version: 1.3
Severity: Normal | Resolution:
Keywords: templatetag tags | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Changes (by carljm):
* status: closed => reopened
* resolution: invalid =>
* stage: Unreviewed => Accepted
Comment:
I don't think this is really a bug related to deployment servers; in those
cases you pretty much need to reload the server for all code changes.
But I do think there is a valid bug here, and it's specifically related to
cases where Django auto-discovers certain modules at startup and then
caches what it discovers (templatetags and the admin). This has a bad
interaction specifically with the runserver auto-reloader. In general the
auto-reloader will reload the server automatically whenever code changes.
If you add a new module and then import it in your code, that involves
changing existing code, so the auto-reloader reloads. But if you add a new
templatetag module and try to load and use it in a template, Django will
never find it until you manually restart runserver. This is genuinely
surprising behavior when you hit it.
I'm not sure at this point what the fix would look like, or if there is
even a good fix. We may in the end need to just wontfix this for lack of a
good solution. But I think it should be left open at this point to see if
anyone has good ideas for a fix, as it is a real issue.
--
Ticket URL: <https://code.djangoproject.com/ticket/17070#comment:2>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.