mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
extra_body_script module support, closes #1187
This commit is contained in:
parent
fa0c3777b8
commit
c38c42948c
5 changed files with 31 additions and 9 deletions
|
|
@ -70,7 +70,7 @@ def extra_body_script(
|
|||
template, database, table, view_name, columns, request, datasette
|
||||
):
|
||||
async def inner():
|
||||
return "var extra_body_script = {};".format(
|
||||
script = "var extra_body_script = {};".format(
|
||||
json.dumps(
|
||||
{
|
||||
"template": template,
|
||||
|
|
@ -90,6 +90,7 @@ def extra_body_script(
|
|||
}
|
||||
)
|
||||
)
|
||||
return {"script": script, "module": True}
|
||||
|
||||
return inner
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue