flask.Flask.add_template_filter

Flask.add_template_filter(*args, **kwargs)[source]

Register a custom template filter. Works exactly like the template_filter() decorator.

Parameters:name – the optional name of the filter, otherwise the function name will be used.