mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #33864 -- Deprecated length_is template filter.
This commit is contained in:
committed by
Mariusz Felisiak
parent
2fac0a1808
commit
4d4bf55e0e
@@ -317,3 +317,18 @@ Miscellaneous
|
||||
for using Python's :py:mod:`secrets` module to generate passwords.
|
||||
|
||||
* The ``AlterIndexTogether`` migration operation is deprecated.
|
||||
|
||||
* The ``length_is`` template filter is deprecated in favor of :tfilter:`length`
|
||||
and the ``==`` operator within an :ttag:`{% if %}<if>` tag. For example
|
||||
|
||||
.. code-block:: html+django
|
||||
|
||||
{% if value|length == 4 %}…{% endif %}
|
||||
{% if value|length == 4 %}True{% else %}False{% endif %}
|
||||
|
||||
instead of:
|
||||
|
||||
.. code-block:: html+django
|
||||
|
||||
{% if value|length_is:4 %}…{% endif %}
|
||||
{{ value|length_is:4 }}
|
||||
|
||||
Reference in New Issue
Block a user