From c00ae7f58c34962ed6dbec4eb8aaf747da59ed2f Mon Sep 17 00:00:00 2001 From: Preston Timmons Date: Thu, 21 Jan 2016 21:50:06 -0600 Subject: Fixed #26118 -- Added 'is' operator to if template tag. --- docs/ref/templates/builtins.txt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'docs/ref') 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 ~~~~~~~ -- cgit v1.3