Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed documentation from [4558] to be correct.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4559 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit a01f852d2ea4776a598bd184004433c9a51bceb2 1 parent 36512d5
@jacobian jacobian authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 docs/templates_python.txt
View
6 docs/templates_python.txt
@@ -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
----------------------------
Please sign in to comment.
Something went wrong with that request. Please try again.