1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Moved docs about chaining if tag comparison operators.

This commit is contained in:
Alasdair Nicol 2016-04-09 16:28:07 +01:00 committed by Tim Graham
parent 03e1cc930c
commit c10db4bd1b

View File

@ -515,15 +515,6 @@ of how ``x in y`` will be interpreted::
Not contained within. This is the negation of the ``in`` operator.
The comparison operators cannot be 'chained' like in Python or in mathematical
notation. For example, instead of using::
{% if a > b > c %} (WRONG)
you should use::
{% if a > b and b > c %}
``is`` operator
^^^^^^^^^^^^^^^
@ -573,6 +564,15 @@ If you need different precedence, you will need to use nested :ttag:`if` tags.
Sometimes that is better for clarity anyway, for the sake of those who do not
know the precedence rules.
The comparison operators cannot be 'chained' like in Python or in mathematical
notation. For example, instead of using::
{% if a > b > c %} (WRONG)
you should use::
{% if a > b and b > c %}
``ifequal`` and ``ifnotequal``
------------------------------