diff --git a/docs/changelog.rst b/docs/changelog.rst index 6f3af8ce..d580f03e 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -12,7 +12,7 @@ Changelog .. warning:: This is an **alpha** release. See :ref:`contributing_alpha_beta`. - New :ref:`plugin_hook_startup` plugin hook. (`#834 `__) -- New :ref:`plugin_hook_canned_queries` plugin hook. (`#852 `__) +- New :ref:`plugin_hook_canned_queries` plugin hook. See `datasette-saved-queries `__ for an example of this hook in action. (`#852 `__) - Workaround for "Too many open files" error in test runs. (`#846 `__) - Respect existing ``scope["actor"]`` if already set by ASGI middleware. (`#854 `__) - New process for shipping :ref:`contributing_alpha_beta`. (`#807 `__) diff --git a/docs/ecosystem.rst b/docs/ecosystem.rst index dcb5a887..f2da885c 100644 --- a/docs/ecosystem.rst +++ b/docs/ecosystem.rst @@ -157,12 +157,16 @@ datasette-leaflet-geojson `datasette-leaflet-geojson `__ looks out for columns containing GeoJSON formatted geographical information and displays them on a `Leaflet-powered `__ map. - datasette-pretty-json --------------------- `datasette-pretty-json `__ seeks out JSON values in Datasette's table browsing interface and pretty-prints them, making them easier to read. +datasette-saved-queries +----------------------- + +`datasette-saved-queries `__ lets users interactively save queries to a ``saved_queries`` table. They are then made available as additional :ref:`canned queries `. + datasette-haversine ------------------- diff --git a/docs/plugins.rst b/docs/plugins.rst index dce1bdf0..d2743419 100644 --- a/docs/plugins.rst +++ b/docs/plugins.rst @@ -1028,9 +1028,11 @@ Or you can return an async function which will be awaited on startup. Use this o Potential use-cases: * Run some initialization code for the plugin -* Create database tables that a plugin needs +* Create database tables that a plugin needs on startup * Validate the metadata configuration for a plugin on startup, and raise an error if it is invalid +Example: `datasette-saved-queries `__ + .. _plugin_hook_canned_queries: canned_queries(datasette, database, actor) @@ -1098,6 +1100,8 @@ The actor parameter can be used to include the currently authenticated actor in } for result in results} return inner +Example: `datasette-saved-queries `__ + .. _plugin_hook_actor_from_request: actor_from_request(datasette, request)