mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #22294 -- Prevented converting length filter output to string
Thanks Steve Pike for the report.
This commit is contained in:
parent
6a0291bdaf
commit
bc315266c8
4 changed files with 10 additions and 6 deletions
|
@ -1680,7 +1680,8 @@ For example::
|
|||
|
||||
{{ value|length }}
|
||||
|
||||
If ``value`` is ``['a', 'b', 'c', 'd']``, the output will be ``4``.
|
||||
If ``value`` is ``['a', 'b', 'c', 'd']`` or ``"abcd"``, the output will be
|
||||
``4``.
|
||||
|
||||
.. templatefilter:: length_is
|
||||
|
||||
|
@ -1693,7 +1694,8 @@ For example::
|
|||
|
||||
{{ value|length_is:"4" }}
|
||||
|
||||
If ``value`` is ``['a', 'b', 'c', 'd']``, the output will be ``True``.
|
||||
If ``value`` is ``['a', 'b', 'c', 'd']`` or ``"abcd"``, the output will be
|
||||
``True``.
|
||||
|
||||
.. templatefilter:: linebreaks
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue