From c10db4bd1b069739687b99d6b32b946634237431 Mon Sep 17 00:00:00 2001 From: Alasdair Nicol Date: Sat, 9 Apr 2016 16:28:07 +0100 Subject: [PATCH] Moved docs about chaining if tag comparison operators. --- docs/ref/templates/builtins.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index 1965e89f3c2..37abc626088 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -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`` ------------------------------