summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/templates/builtins.txt7
-rw-r--r--docs/releases/1.9.txt3
2 files changed, 10 insertions, 0 deletions
diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt
index af0da83354..f51e70dcac 100644
--- a/docs/ref/templates/builtins.txt
+++ b/docs/ref/templates/builtins.txt
@@ -285,6 +285,13 @@ Or if only some variables should be escaped, you can use::
{% firstof var1 var2|safe var3 "<strong>fallback value</strong>"|safe %}
+You can use the syntax ``{% firstof var1 var2 var3 as value %}`` to store the
+output inside a variable.
+
+.. versionadded:: 1.9
+
+ The "as" syntax was added.
+
.. templatetag:: for
for
diff --git a/docs/releases/1.9.txt b/docs/releases/1.9.txt
index d89354ea6a..47c2bc98bc 100644
--- a/docs/releases/1.9.txt
+++ b/docs/releases/1.9.txt
@@ -208,6 +208,9 @@ Templates
* A warning will now be logged for missing context variables. These messages
will be logged to the :ref:`django.template <django-template-logger>` logger.
+* The :ttag:`firstof` template tag supports storing the output in a variable
+ using 'as'.
+
Requests and Responses
^^^^^^^^^^^^^^^^^^^^^^