diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2007-02-23 20:50:53 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2007-02-23 20:50:53 +0000 |
| commit | a01f852d2ea4776a598bd184004433c9a51bceb2 (patch) | |
| tree | b0889c1116c3b516e001ae2914fb26f100502380 /docs/templates_python.txt | |
| parent | 36512d5d734feee53b7787dbdf2d671f158ebaae (diff) | |
Fixed documentation from [4558] to be correct.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4559 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/templates_python.txt')
| -rw-r--r-- | docs/templates_python.txt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/templates_python.txt b/docs/templates_python.txt index b6bfe67da2..5dd8e4fde0 100644 --- a/docs/templates_python.txt +++ b/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 ---------------------------- |
