mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Pass view_name to extra_body_script hook (#443)
At the moment it's not easy to tell whether the hook is being called in (for example) the row or table view, as in both cases the `database` and `table` parameters are provided. This passes the `view_name` added in #441 to the `extra_body_script` hook.
This commit is contained in:
parent
470cf0b05d
commit
bf229c9bd8
3 changed files with 7 additions and 3 deletions
|
|
@ -26,7 +26,7 @@ def extra_js_urls(template, database, table, datasette):
|
|||
|
||||
|
||||
@hookspec
|
||||
def extra_body_script(template, database, table, datasette):
|
||||
def extra_body_script(template, database, table, view_name, datasette):
|
||||
"Extra JavaScript code to be included in <script> at bottom of body"
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue