def format(fmt_str, *args, **kwargs):
    if args and kwargs:
        raise jinja2.exceptions.FilterArgumentError(
            "can't handle positional and keyword arguments at the same time")
Jinja Templates - Format a float as comma-separated currency