table_actions() plugin hook plus menu, closes #1066

Refs #690
This commit is contained in:
Simon Willison 2020-10-29 22:16:41 -07:00
commit 2f7731e9e5
10 changed files with 166 additions and 14 deletions

View file

@ -155,3 +155,12 @@ def menu_links(datasette, actor):
return [{"href": datasette.urls.instance(), "label": "Hello 2"}]
return inner
@hookimpl
def table_actions(datasette, database, table, actor):
async def inner():
if actor:
return [{"href": datasette.urls.instance(), "label": "From async"}]
return inner