mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
Fixed #13058 - "smart if" template tag doesn't support "if not in ..." condition
Thanks to ramusus for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12732 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -440,6 +440,11 @@ how ``x in y`` will be interpreted::
|
||||
instance that belongs to the QuerySet.
|
||||
{% endif %}
|
||||
|
||||
``not in`` operator
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
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::
|
||||
|
||||
@@ -636,9 +636,9 @@ You can now do this:
|
||||
There's really no reason to use ``{% ifequal %}`` or ``{% ifnotequal %}``
|
||||
anymore, unless you're the nostalgic type.
|
||||
|
||||
The operators supported are ``==``, ``!=``, ``<``, ``>``, ``<=``, ``>=`` and
|
||||
``in``, all of which work like the Python operators, in addition to ``and``,
|
||||
``or`` and ``not``, which were already supported.
|
||||
The operators supported are ``==``, ``!=``, ``<``, ``>``, ``<=``, ``>=``,
|
||||
``in`` and ``not in``, all of which work like the Python operators, in addition
|
||||
to ``and``, ``or`` and ``not``, which were already supported.
|
||||
|
||||
Also, filters may now be used in the ``if`` expression. For example:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user