mirror of
https://github.com/django/django.git
synced 2025-05-20 13:56:30 +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
|
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…
x
Reference in New Issue
Block a user