mirror of
https://github.com/django/django.git
synced 2024-12-23 01:25:58 +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
@ -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
|
||||
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):
|
||||
return value.lower()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user