diff options
| author | Gabriel Hurley <gabehr@gmail.com> | 2011-02-07 23:44:43 +0000 |
|---|---|---|
| committer | Gabriel Hurley <gabehr@gmail.com> | 2011-02-07 23:44:43 +0000 |
| commit | f80e997c508cd4c218a5d0ac89018f1be908af85 (patch) | |
| tree | 91bf22e7be1c855a4f74b28b49449dc7f625c284 /docs | |
| parent | 327d69de7365e200461bd0f8d5f676a97048423b (diff) | |
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
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/howto/custom-template-tags.txt | 4 |
1 files 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`_. |
