Filters
Variables can be modified by filters. Filters are separated from thevariable by a pipe symbol (|
) and may have optional arguments inparentheses. Multiple filters can be chained. The output of one filter isapplied to the next.
For example, {{ name|striptags|title }}
will remove all HTML Tags fromvariable name and title-case the output (title(striptags(name))
).
Filters that accept arguments have parentheses around the arguments, just likea function call. For example: {{ listx|join(', ') }}
will join a list withcommas (str.join(', ', listx)
).
The List of Builtin Filters below describes all the builtin filters.