Refactor template setup into Datasette constructor

Closes #707
This commit is contained in:
Simon Willison 2020-03-26 18:12:43 -07:00
commit 2aaad72789
3 changed files with 36 additions and 35 deletions

View file

@ -36,7 +36,7 @@ This method lets you read plugin configuration values that were set in ``metadat
``template`` - string
The template file to be rendered, e.g. ``my_plugin.html``. Datasette will search for this file first in the ``--template-dir=`` location, if it was specified - then in the plugin's bundled templates and finally in Datasette's set of default templates.
``conttext`` - None or a Python dictionary
``context`` - None or a Python dictionary
The context variables to pass to the template.
``request`` - request object or None