Fixed #25236 -- Deprecated {% ifequal %} and {% ifnotequal %} template tags.

The {% if %} tag provides all features of these tags.

Since Django 1.2 (May 17, 2010), the docs have hinted that
{% ifequal %} and {% ifnotequal %} will be deprecated in a future
Django version. Time to make it official.
This commit is contained in:
Jon Dufresne 2020-05-02 18:04:51 -07:00 committed by Mariusz Felisiak
parent d8cb8fdf40
commit 72a170b4c3
8 changed files with 62 additions and 9 deletions

View file

@ -611,10 +611,11 @@ you should use::
``ifequal`` and ``ifnotequal``
------------------------------
.. deprecated:: 3.1
``{% ifequal a b %} ... {% endifequal %}`` is an obsolete way to write
``{% if a == b %} ... {% endif %}``. Likewise, ``{% ifnotequal a b %} ...
{% endifnotequal %}`` is superseded by ``{% if a != b %} ... {% endif %}``.
The ``ifequal`` and ``ifnotequal`` tags will be deprecated in a future release.
.. templatetag:: ifchanged