mirror of
https://github.com/django/django.git
synced 2025-11-17 18:48:15 +00:00
Fixed #18125 -- Explained caveat with filters
Thanks ebrelsford AT gmail.com and oinopion.
This commit is contained in:
parent
f269f30544
commit
06ea10e1f1
1 changed files with 4 additions and 0 deletions
|
|
@ -226,6 +226,10 @@ tags:
|
||||||
Athlete: {{ athlete_list.0.name }}
|
Athlete: {{ athlete_list.0.name }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
While the above example works, be aware that most template filters return
|
||||||
|
strings, so mathematical comparisons using filters will generally not work
|
||||||
|
as you expect. :tfilter:`length` is an exception.
|
||||||
|
|
||||||
:ttag:`block` and :ttag:`extends`
|
:ttag:`block` and :ttag:`extends`
|
||||||
Set up `template inheritance`_ (see below), a powerful way
|
Set up `template inheritance`_ (see below), a powerful way
|
||||||
of cutting down on "boilerplate" in templates.
|
of cutting down on "boilerplate" in templates.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue