Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
  • Loading branch information...
commit f80e997c508cd4c218a5d0ac89018f1be908af85 1 parent 327d69d
authored February 07, 2011

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  docs/howto/custom-template-tags.txt
4  docs/howto/custom-template-tags.txt
@@ -669,7 +669,7 @@ If your template tag needs to access the current context, you can use the
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,7 +678,7 @@ Or, using decorator syntax::
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`_.

0 notes on commit f80e997

Please sign in to comment.
Something went wrong with that request. Please try again.