mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
prepare_jinja2_environment(datasette) argument, refs #1809
This commit is contained in:
parent
610425460b
commit
b40872f5e5
5 changed files with 14 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue