Fixed #4000 - changed documentation to note that filter arguments no longer need to be quoted (and added a test to that effect). Thanks, SmileyChris.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5436 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
908b72f76d
commit
f6491bf984
|
@ -91,9 +91,12 @@ Filters can be "chained." The output of one filter is applied to the next.
|
|||
``{{ text|escape|linebreaks }}`` is a common idiom for escaping text contents,
|
||||
then converting line breaks to ``<p>`` tags.
|
||||
|
||||
Some filters take arguments. A filter argument looks like this:
|
||||
``{{ bio|truncatewords:"30" }}``. This will display the first 30 words of the
|
||||
``bio`` variable. Filter arguments always are in double quotes.
|
||||
Some filters take arguments. A filter argument looks like this: ``{{
|
||||
bio|truncatewords:30 }}``. This will display the first 30 words of the ``bio``
|
||||
variable.
|
||||
|
||||
Filter arguments that contain spaces must be quoted; for example, to join a list
|
||||
with commas and spaced you'd use ``{{ list|join:", " }}``.
|
||||
|
||||
The `Built-in filter reference`_ below describes all the built-in filters.
|
||||
|
||||
|
|
Loading…
Reference in New Issue