Django

Code

Changeset 5436

Show
Ignore:
Timestamp:
06/07/07 13:18:44 (1 year ago)
Author:
jacob
Message:

Fixed #4000 - changed documentation to note that filter arguments no longer need to be quoted (and added a test to that effect). Thanks, SmileyChris?.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/templates.txt

    r5359 r5436  
    9292then converting line breaks to ``<p>`` tags. 
    9393 
    94 Some filters take arguments. A filter argument looks like this: 
    95 ``{{ bio|truncatewords:"30" }}``. This will display the first 30 words of the 
    96 ``bio`` variable. Filter arguments always are in double quotes. 
     94Some filters take arguments. A filter argument looks like this: ``{{ 
     95bio|truncatewords:30 }}``. This will display the first 30 words of the ``bio`` 
     96variable. 
     97 
     98Filter arguments that contain spaces must be quoted; for example, to join a list 
     99with commas and spaced you'd use ``{{ list|join:", " }}``. 
    97100 
    98101The `Built-in filter reference`_ below describes all the built-in filters.