A collection of additional template filters for the Askama templating engine
This library is intended to be used alongside Askama and is effectively useless without it.
Inside any module that is defining an Askama
use askama_filters::filters; and they will be available
in the HTML template.
If you wish to use this library in addition to your own filters
create a module named
filters and add
to it. Then import that module wherever you are creating
and both sets of filters should be available.
A number of filters in this library return HTML markup.
For security reasons these are not automatically considered safe
and you most likely will want to chain them with the
var|markdown|safe. Escaping inbetween is also recommeneded
There are a few optional features that can be enabled:
markdown: Markdown parsing using a filter.
date: Parse and format date/time strings.
The main collection of filters. These filters do not require a feature flag.