mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Remove load_plugin hook - closes #1073
Refs #1042
This reverts commit 81dea4b07a.
This commit is contained in:
parent
a2a7090720
commit
f0a740ac21
8 changed files with 11 additions and 73 deletions
|
|
@ -271,24 +271,6 @@ You can also return an awaitable function that returns a string.
|
|||
|
||||
Example: `datasette-cluster-map <https://github.com/simonw/datasette-cluster-map>`_
|
||||
|
||||
.. _plugin_hook_load_template:
|
||||
|
||||
load_template(template, request, datasette)
|
||||
-------------------------------------------
|
||||
|
||||
``template`` - string
|
||||
The template that is being rendered, e.g. ``database.html``
|
||||
|
||||
``request`` - object or None
|
||||
The current HTTP :ref:`internals_request`. This can be ``None`` if the request object is not available.
|
||||
|
||||
``datasette`` - :ref:`internals_datasette`
|
||||
You can use this to access plugin configuration options via ``datasette.plugin_config(your_plugin_name)``
|
||||
|
||||
Load the source code for a template from a custom location. Hooks should return a string, or ``None`` if the template is not found.
|
||||
|
||||
Datasette will fall back to serving templates from files on disk if the requested template cannot be loaded by any plugins.
|
||||
|
||||
.. _plugin_hook_publish_subcommand:
|
||||
|
||||
publish_subcommand(publish)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue