Logic Tags
10 tags
- cycle cycles through list of arguments. Most useful
-
firstof
returns the first argument in a list of arguments that evaluates to
True. - for for loop. Most useful
- for … empty display text when for loop is empty. Most useful
- if if condition. Most useful
- ifchanged checks if value in loop has changed since last iteration.
-
ifequal
Removed. Use
{% if a == b %}instead. Removed in Django 4.0 -
ifnotequal
Removed. Use
{% if a != b %}instead. Removed in Django 4.0 -
resetcycle
used to reset a
cycle. - with caches a variable for reuse. Most useful
