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.
changed the title
datasette.render_template(template, ...) should also accept a list of templatesOct 24, 2020
await .render_template(template, context=None, request=None)
This currently only accepts a single template. If it accepted a list of templates (where the first available template gets rendered) it could be more widely used by Datasette internally.
Spotted this while researching #1042.
The text was updated successfully, but these errors were encountered: