Ticket #10545: 10545.diff
File 10545.diff, 835 bytes (added by , 15 years ago) |
---|
-
docs/howto/custom-template-tags.txt
820 820 821 821 {% current_time "%Y-%M-%d %I:%M %p" %}<p>The time is {{ current_time }}.</p> 822 822 823 .. admonition:: Variable scope in context 824 825 Any variable set to the context will only be available in the same ``block`` 826 of the template in which it was assigned. This behaviour is intentional as 827 it provides a scope for the variables so that they don't clash with others. 828 823 829 But, there's a problem with ``CurrentTimeNode2``: The variable name 824 830 ``current_time`` is hard-coded. This means you'll need to make sure your 825 831 template doesn't use ``{{ current_time }}`` anywhere else, because the