Code

Ticket #15138: inclusion_tag_doc.diff

File inclusion_tag_doc.diff, 816 bytes (added by elbarto, 3 years ago)
Line 
1Index: docs/howto/custom-template-tags.txt
2===================================================================
3--- docs/howto/custom-template-tags.txt (revisión: 15254)
4+++ docs/howto/custom-template-tags.txt (copia de trabajo)
5@@ -667,7 +667,7 @@
6 ``takes_context`` argument when registering your tag::
7 
8     # The first argument *must* be called "context" here.
9-    def current_time(context, format_string):
10+    def current_time(context):
11         timezone = context['timezone']
12         return your_get_current_time_method(timezone)
13 
14@@ -676,7 +676,7 @@
15 Or, using decorator syntax::
16 
17     @register.simple_tag(takes_context=True)
18-    def current_time(context, format_string):
19+    def current_time(context):
20         timezone = context['timezone']
21         return your_get_current_time_method(timezone)
22