From f80e997c508cd4c218a5d0ac89018f1be908af85 Mon Sep 17 00:00:00 2001 From: Gabriel Hurley Date: Mon, 7 Feb 2011 23:44:43 +0000 Subject: [PATCH] Fixed #15138 -- Clarified a slightly ambiguous example in the custom template tag docs. Thanks to elbarto for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15448 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/howto/custom-template-tags.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/howto/custom-template-tags.txt b/docs/howto/custom-template-tags.txt index 5ca56223cc..ec4cd35de0 100644 --- a/docs/howto/custom-template-tags.txt +++ b/docs/howto/custom-template-tags.txt @@ -669,7 +669,7 @@ If your template tag needs to access the current context, you can use the # The first argument *must* be called "context" here. def current_time(context, format_string): timezone = context['timezone'] - return your_get_current_time_method(timezone) + return your_get_current_time_method(timezone, format_string) register.simple_tag(takes_context=True)(current_time) @@ -678,7 +678,7 @@ Or, using decorator syntax:: @register.simple_tag(takes_context=True) def current_time(context, format_string): timezone = context['timezone'] - return your_get_current_time_method(timezone) + return your_get_current_time_method(timezone, format_string) For more information on how the ``takes_context`` option works, see the section on `inclusion tags`_.