mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
extra_template_vars plugin hook (#542)
* extra_template_vars plugin hook Closes #541 * Workaround for cwd bug Based on https://github.com/pytest-dev/pytest/issues/1235#issuecomment-175295691
This commit is contained in:
parent
a18e0964ec
commit
fcfcae21e6
9 changed files with 186 additions and 19 deletions
|
|
@ -35,6 +35,11 @@ def extra_body_script(template, database, table, view_name, datasette):
|
|||
"Extra JavaScript code to be included in <script> at bottom of body"
|
||||
|
||||
|
||||
@hookspec
|
||||
def extra_template_vars(template, database, table, view_name, request, datasette):
|
||||
"Extra template variables to be made available to the template - can return dict or callable or awaitable"
|
||||
|
||||
|
||||
@hookspec
|
||||
def publish_subcommand(publish):
|
||||
"Subcommands for 'datasette publish'"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue