mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Test for prepare_jinja2_environment, refs #773
This commit is contained in:
parent
57f48b8416
commit
cbeea23d00
2 changed files with 15 additions and 0 deletions
|
|
@ -87,3 +87,8 @@ def extra_template_vars(template, database, table, view_name, request, datasette
|
|||
default=lambda b: b.decode("utf8"),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@hookimpl
|
||||
def prepare_jinja2_environment(env):
|
||||
env.filters["format_numeric"] = lambda s: "{:,.0f}".format(float(s))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue