mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
view_actions plugin hook, closes #2297
This commit is contained in:
parent
daf5ca02ca
commit
909c85cd2b
7 changed files with 85 additions and 21 deletions
|
|
@ -391,6 +391,18 @@ def table_actions(datasette, database, table, actor):
|
|||
]
|
||||
|
||||
|
||||
@hookimpl
|
||||
def view_actions(datasette, database, view, actor):
|
||||
if actor:
|
||||
return [
|
||||
{
|
||||
"href": datasette.urls.instance(),
|
||||
"label": f"Database: {database}",
|
||||
},
|
||||
{"href": datasette.urls.instance(), "label": f"View: {view}"},
|
||||
]
|
||||
|
||||
|
||||
@hookimpl
|
||||
def query_actions(datasette, database, query_name, sql):
|
||||
# Don't explain an explain
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue