It would be nice to mention that to have new tags and filters loaded one
should restart the server.
--
Ticket URL: <https://code.djangoproject.com/ticket/20417>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_docs: => 0
* needs_tests: => 0
* easy: 0 => 1
* stage: Unreviewed => Accepted
Comment:
Hi,
I agree, this would be a welcome addition.
--
Ticket URL: <https://code.djangoproject.com/ticket/20417#comment:1>
* owner: nobody => EvilDMP
* status: new => assigned
Comment:
I have tentatively reserved this ticket for first-time committers who take
part in the [https://dont-be-afraid-to-commit.readthedocs.org/ Don't be
afraid to commit workshop] at the [http://2013.djangocon.eu/ DjangoCon
Europe 2013] sprints on 18th and 19th May.
If you want to tackle this ticket before then, please '''don't''' let the
fact that it's assigned to me stop you. Feel free to re-assign it to
yourself and do whatever you like to it.
--
Ticket URL: <https://code.djangoproject.com/ticket/20417#comment:2>
* owner: EvilDMP => anonymous
--
Ticket URL: <https://code.djangoproject.com/ticket/20417#comment:3>
* owner: anonymous => DjangoPanngo
--
Ticket URL: <https://code.djangoproject.com/ticket/20417#comment:4>
* owner: DjangoPanngo => anonymous
--
Ticket URL: <https://code.djangoproject.com/ticket/20417#comment:5>
Comment (by DjangoPanngo):
Please review and advise if the layout/content/placement need to change.
--
Ticket URL: <https://code.djangoproject.com/ticket/20417#comment:6>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/20417#comment:7>
Comment (by Krzysztof Malinowski <boromil@…>):
Sorry about taking this ticket off you DjangoPanngo - I've tried before to
sign it to myself but it only showed anonymous... anyway I also submitted
a proposition through [https://github.com/boromil/django/commit/%2320417
githubs] pull request. Your look good to so let someone else decide.
--
Ticket URL: <https://code.djangoproject.com/ticket/20417#comment:8>
* stage: Ready for checkin => Accepted
Comment:
Moving this back to accepted because it's missing mentioning of filters.
--
Ticket URL: <https://code.djangoproject.com/ticket/20417#comment:9>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/20417#comment:10>
Comment (by boromil):
[https://github.com/boromil/django/tree/%2320417 This is] the updated
branch with the corrected info.
--
Ticket URL: <https://code.djangoproject.com/ticket/20417#comment:11>
* cc: timograham@… (added)
Comment:
I'm not sure exactly what requires reloading the server? I was testing
with the staticfiles template tag and got an error "TemplateSyntaxError:
Invalid block tag: 'static'". I then added "{% load staticfiles %}" to
the template and didn't reload the development server, but the error was
resolved when refreshing the page.
--
Ticket URL: <https://code.djangoproject.com/ticket/20417#comment:12>
* needs_better_patch: 0 => 1
* has_patch: 0 => 1
* stage: Ready for checkin => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/20417#comment:13>
* cc: zbigniew@… (added)
Comment:
It's not about adding new {{{ {% load %} }}} tags to the template. The
reload is necessary when you add new Python module containing tags or
filters definitions to the {{{ templatetags }}} subdirectory of an app.
--
Ticket URL: <https://code.djangoproject.com/ticket/20417#comment:14>
Comment (by timo):
Tried that as well. Added {{{ {% load foo %} }}} to a template without
that module in myapp.templatetags and got the error:
{{{
TemplateSyntaxError:
'foo' is not a valid tag library: Template library foo not found,
tried django.templatetags.foo,myapp.templatetags.foo,etc.
}}}
Then added foo.py to myapp.templatetags and refreshed the page without
reloading the server and the filter in "foo" worked.
--
Ticket URL: <https://code.djangoproject.com/ticket/20417#comment:15>
Comment (by carljm):
The problem occurs only when an app in ``INSTALLED_APPS`` does not have a
``templatetags`` submodule at all, and then one is added while the server
is running; Django won't see it unless you restart the server.
--
Ticket URL: <https://code.djangoproject.com/ticket/20417#comment:16>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"a46a399534c26abd3f4984149b820f34869d6b74"]:
{{{
#!CommitTicketReference repository=""
revision="a46a399534c26abd3f4984149b820f34869d6b74"
Fixed #20417 - Noted that a server restart is required to load new
templatetag modules.
Thanks Katya for the suggestion.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/20417#comment:17>
Comment (by Tim Graham <timograham@…>):
In [changeset:"9ed2121eca0d4543dd665d7c5a3015beaee28eb4"]:
{{{
#!CommitTicketReference repository=""
revision="9ed2121eca0d4543dd665d7c5a3015beaee28eb4"
[1.5.x] Fixed #20417 - Noted that a server restart is required to load new
templatetag modules.
Thanks Katya for the suggestion.
Backport of a46a399534 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/20417#comment:18>