Code

Ticket #6898: templates_python.txt.diff

File templates_python.txt.diff, 1022 bytes (added by djoume, 6 years ago)
Line 
1Index: templates_python.txt
2===================================================================
3--- templates_python.txt        (revision 7364)
4+++ templates_python.txt        (working copy)
5@@ -1059,8 +1059,8 @@
6 
7 Although you can pass any number of arguments to a template tag using
8 ``token.split_contents()``, the arguments are all unpacked as
9-string literals. A little more work is required in order to dynamic content (a
10-template variable) to a template tag as an argument.
11+string literals. A little more work is required in order to pass dynamic
12+content (a template variable) to a template tag as an argument.
13 
14 While the previous examples have formatted the current time into a string and
15 returned the string, suppose you wanted to pass in a ``DateTimeField`` from an
16@@ -1169,7 +1169,7 @@
17 In Python 2.4, the decorator syntax also works::
18 
19     @register.simple_tag
20-    def current_time(token):
21+    def current_time(format_string):
22         ...
23 
24 A couple of things to note about the ``simple_tag`` helper function: