register_routes() plugin hook datasette argument, closes #1404

This commit is contained in:
Simon Willison 2021-07-26 16:16:46 -07:00
commit eccfeb0871
6 changed files with 37 additions and 4 deletions

View file

@ -529,8 +529,11 @@ Examples: `datasette-atom <https://github.com/simonw/datasette-atom>`_, `dataset
.. _plugin_register_routes:
register_routes()
-----------------
register_routes(datasette)
--------------------------
``datasette`` - :ref:`internals_datasette`
You can use this to access plugin configuration options via ``datasette.plugin_config(your_plugin_name)``
Register additional view functions to execute for specified URL routes.