mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
database_actions() plugin hook, closes #1077
This commit is contained in:
parent
b61f6cceb5
commit
7b19492070
10 changed files with 97 additions and 8 deletions
|
|
@ -333,3 +333,14 @@ def table_actions(datasette, database, table, actor):
|
|||
},
|
||||
{"href": datasette.urls.instance(), "label": "Table: {}".format(table)},
|
||||
]
|
||||
|
||||
|
||||
@hookimpl
|
||||
def database_actions(datasette, database, actor):
|
||||
if actor:
|
||||
return [
|
||||
{
|
||||
"href": datasette.urls.instance(),
|
||||
"label": "Database: {}".format(database),
|
||||
}
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue