New plugin hook: canned_queries(), refs #852

This commit is contained in:
Simon Willison 2020-06-18 16:22:33 -07:00
commit 6c26345836
12 changed files with 203 additions and 50 deletions

View file

@ -78,3 +78,8 @@ def actor_from_request(datasette, request):
@hookspec
def permission_allowed(datasette, actor, action, resource):
"Check if actor is allowed to perfom this action - return True, False or None"
@hookspec
def canned_queries(datasette, database, actor):
"Return a dictonary of canned query definitions or an awaitable function that returns them"