summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorPreston Timmons <preston.timmons@rewardstyle.com>2016-01-21 21:50:06 -0600
committerTim Graham <timograham@gmail.com>2016-01-22 15:35:28 -0500
commitc00ae7f58c34962ed6dbec4eb8aaf747da59ed2f (patch)
treeb3985f7262b60ff43ca6f0e7bc4c84b2d25a915e /docs
parenta08d2463d2674b95f5a995f77cd9596168378a4f (diff)
Fixed #26118 -- Added 'is' operator to if template tag.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/templates/builtins.txt13
-rw-r--r--docs/releases/1.10.txt2
2 files changed, 14 insertions, 1 deletions
diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt
index bbc3ef063c..035a619a14 100644
--- a/docs/ref/templates/builtins.txt
+++ b/docs/ref/templates/builtins.txt
@@ -432,7 +432,7 @@ Use of actual parentheses in the :ttag:`if` tag is invalid syntax. If you need
them to indicate precedence, you should use nested :ttag:`if` tags.
:ttag:`if` tags may also use the operators ``==``, ``!=``, ``<``, ``>``,
-``<=``, ``>=`` and ``in`` which work as follows:
+``<=``, ``>=``, ``in``, and ``is`` which work as follows:
``==`` operator
^^^^^^^^^^^^^^^
@@ -524,6 +524,17 @@ you should use::
{% if a > b and b > c %}
+``is`` operator
+^^^^^^^^^^^^^^^
+
+.. versionadded:: 1.10
+
+Object identity. Tests if two values are the same object. Example::
+
+ {% if value is None %}
+ This will output if and only if value is None.
+ {% endif %}
+
Filters
~~~~~~~
diff --git a/docs/releases/1.10.txt b/docs/releases/1.10.txt
index d0a7ba3b41..30e0660a51 100644
--- a/docs/releases/1.10.txt
+++ b/docs/releases/1.10.txt
@@ -291,6 +291,8 @@ Templates
:class:`~django.template.backends.django.DjangoTemplates` backend and the
:class:`~django.template.Engine` class.
+* Added the ``is`` comparison operator to the :ttag:`if` tag.
+
Tests
~~~~~