load_template() plugin hook

Closes #1042
This commit is contained in:
Simon Willison 2020-10-30 10:47:18 -07:00 committed by GitHub
commit 81dea4b07a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 73 additions and 12 deletions

View file

@ -49,6 +49,11 @@ def extra_template_vars(
"Extra template variables to be made available to the template - can return dict or callable or awaitable"
@hookspec(firstresult=True)
def load_template(template, request, datasette):
"Load the specified template, returning the template code as a string"
@hookspec
def publish_subcommand(publish):
"Subcommands for 'datasette publish'"