prepare_jinja2_environment(datasette) argument, refs #1809

This commit is contained in:
Simon Willison 2022-09-14 14:31:54 -07:00
commit b40872f5e5
5 changed files with 14 additions and 7 deletions

View file

@ -142,8 +142,9 @@ def extra_template_vars(
@hookimpl
def prepare_jinja2_environment(env):
def prepare_jinja2_environment(env, datasette):
env.filters["format_numeric"] = lambda s: f"{float(s):,.0f}"
env.filters["to_hello"] = lambda s: datasette._HELLO
@hookimpl