Implemented import shortcuts, closes #957

This commit is contained in:
Simon Willison 2022-02-05 22:34:33 -08:00
commit 8a25ea9bca
4 changed files with 29 additions and 1 deletions

View file

@ -300,6 +300,15 @@ def register_routes():
def startup(datasette):
datasette._startup_hook_fired = True
# And test some import shortcuts too
from datasette import Response
from datasette import Forbidden
from datasette import NotFound
from datasette import hookimpl
from datasette import actor_matches_allow
_ = (Response, Forbidden, NotFound, hookimpl, actor_matches_allow)
@hookimpl
def canned_queries(datasette, database, actor):