Skip to content

Commit

Permalink
Fixed documentation from [4558] to be correct.
Browse files Browse the repository at this point in the history
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4559 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
jacobian committed Feb 23, 2007
1 parent 36512d5 commit a01f852
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/templates_python.txt
Expand Up @@ -657,12 +657,14 @@ will use the function's name as the filter name.
Template filters which expect strings
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you are writing a template filter which only expects a string as the first
argument, you should use the included decorator ``to_str`` which will convert
argument, you should use the included decorator ``stringfilter`` which will convert
an object to it's string value before being passed to your function::

from django import template

@template.stringfilter
def lower(value):
return value.lower()
lower = template.to_str(lower)

Writing custom template tags
----------------------------
Expand Down

0 comments on commit a01f852

Please sign in to comment.