Filters can either be defined in a method and then added to Jinja's filters dictionary, or defined in a method decorated with Flask.template_filter.
Defining and registering later:
def format_datetime(value, format="%d %b %Y %I:%M %p"):
"""Format a date time to (Defau...