From f6491bf98402a8896ee1d3f5c7912e588b57a7b8 Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Thu, 7 Jun 2007 18:18:44 +0000 Subject: [PATCH] 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 --- docs/templates.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/templates.txt b/docs/templates.txt index a293bdcff2..d8b511dedc 100644 --- a/docs/templates.txt +++ b/docs/templates.txt @@ -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 ``

`` 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.