Ticket #15138: simple_tag_doc.diff
File simple_tag_doc.diff, 967 bytes (added by , 14 years ago) |
---|
-
docs/howto/custom-template-tags.txt
669 669 # The first argument *must* be called "context" here. 670 670 def current_time(context, format_string): 671 671 timezone = context['timezone'] 672 return your_get_current_time_method(timezone )672 return your_get_current_time_method(timezone, format_string) 673 673 674 674 register.simple_tag(takes_context=True)(current_time) 675 675 … … 678 678 @register.simple_tag(takes_context=True) 679 679 def current_time(context, format_string): 680 680 timezone = context['timezone'] 681 return your_get_current_time_method(timezone )681 return your_get_current_time_method(timezone, format_string) 682 682 683 683 For more information on how the ``takes_context`` option works, see the section 684 684 on `inclusion tags`_.