summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-10-20 15:01:31 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-10-20 15:01:31 +0000
commitb678601df302307f0e1fed9b5354765a3b238481 (patch)
tree517b03f9cd388becbdc922cdfd515eb2f679e802 /docs
parent8a3cf46e6021e9e9b5640c3f79625564527aa165 (diff)
Fixed #4123 -- Changed the firstof template tag to correctly handle a literal
string as its last argument. Thanks, Wesley Fok and Matt Boersma. git-svn-id: http://code.djangoproject.com/svn/django/trunk@6571 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/templates.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/templates.txt b/docs/templates.txt
index eab4b129ce..5d5f657747 100644
--- a/docs/templates.txt
+++ b/docs/templates.txt
@@ -476,6 +476,11 @@ This is equivalent to::
{{ var3 }}
{% endif %}{% endif %}{% endif %}
+You can also use a literal string as a fallback value in case all
+passed variables are False::
+
+ {% firstof var1 var2 var3 "fallback value" %}
+
for
~~~