mirror of
https://github.com/django/django.git
synced 2025-11-07 23:12:33 +00:00
Fixed #4640 -- Fixed import to stringfilter in docs. Proposed solution to move stringfilter into django.template.__init__ introduces a circular import problem.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5667 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
6cf7a4ac65
commit
ab368c9c75
1 changed files with 2 additions and 2 deletions
|
|
@ -674,9 +674,9 @@ If you are writing a template filter which only expects a string as the first
|
||||||
argument, you should use the included decorator ``stringfilter`` 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::
|
an object to it's string value before being passed to your function::
|
||||||
|
|
||||||
from django import template
|
from django.template.defaultfilters import stringfilter
|
||||||
|
|
||||||
@template.stringfilter
|
@stringfilter
|
||||||
def lower(value):
|
def lower(value):
|
||||||
return value.lower()
|
return value.lower()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue