datasette/docs
Brandon Roberts baf986c871
New get_metadata() plugin hook for dynamic metadata
The following hook is added:

    get_metadata(
      datasette=self, key=key, database=database, table=table,
      fallback=fallback
    )

This gets called when we're building our metdata for the rest
of the system to use. We merge whatever the plugins return
with any local metadata (from metadata.yml/yaml/json) allowing
for a live-editable dynamic Datasette.

As a security precation, local meta is *not* overwritable by
plugin hooks. The workflow for transitioning to live-meta would
be to load the plugin with the full metadata.yaml and save.
Then remove the parts of the metadata that you want to be able
to change from the file.

* Avoid race condition: don't mutate databases list

This avoids the nasty "RuntimeError: OrderedDict mutated during
iteration" error that randomly happens when a plugin adds a
new database to Datasette, using `add_database`. This change
makes the add and remove database functions more expensive, but
it prevents the random explosion race conditions that make for
confusing user experience when importing live databases.

Thanks, @brandonrobertz
2021-06-26 15:24:54 -07:00
..
_static/css Fix for version color in nav, refs #892 2020-07-12 13:00:16 -07:00
_templates Custom template for docs, linking to datasette.io 2020-12-07 11:00:10 -08:00
.gitignore Added initial docs, including a changelog 2017-11-16 07:11:00 -08:00
advanced_export.png Export option: _shape=array&_nl=on for newline-delimited JSON 2019-01-27 17:40:23 -08:00
authentication.rst debug-menu permission, closes #1068 2020-10-30 08:41:57 -07:00
auto-build.sh Added --load-extension argument to datasette serve 2017-11-16 08:48:49 -08:00
binary_data.png Binary data documentation, closes #1047 2020-10-31 14:37:58 -07:00
binary_data.rst Standardize on 'query string', not 'querystring', in docs 2021-01-11 13:33:54 -08:00
changelog.rst Release 0.58a1 2021-06-24 09:24:59 -07:00
conf.py © 2017-2021 2021-04-02 13:27:03 -07:00
contributing.rst Use pytest-xdist to speed up tests (#1290) 2021-04-02 20:42:28 -07:00
csv_export.rst Standardize on 'query string', not 'querystring', in docs 2021-01-11 13:33:54 -08:00
custom_templates.rst Fixed master -> main in a bunch of places, mainly docs 2021-03-23 09:19:41 -07:00
datasette-0.51.png Release 0.51 2020-10-31 15:21:49 -07:00
datasette-logo.svg Added new logo to the documentation 2020-07-12 12:53:29 -07:00
datasette-package-help.txt Updated --help output for latest Click, closes #1354 2021-06-01 09:16:58 -07:00
datasette-publish-cloudrun-help.txt Updated --help output for latest Click, closes #1354 2021-06-01 09:16:58 -07:00
datasette-publish-heroku-help.txt Updated --help output for latest Click, closes #1354 2021-06-01 09:16:58 -07:00
datasette-serve-help.txt Updated --help output for latest Click, closes #1354 2021-06-01 09:16:58 -07:00
deploying.rst Minor typo in IP adress (#1256) 2021-03-10 10:26:39 -08:00
ecosystem.rst Shrunk ecosystem docs in favour of datasette.io, closes #1182 2021-01-09 14:17:18 -08:00
facets.png Added screenshots to facets and full_text_search docs, refs #255 2018-05-16 08:27:24 -07:00
facets.rst ?_nofacets=1 option, closes #1350 2021-05-30 22:39:14 -04:00
full_text_search.png Added screenshots to facets and full_text_search docs, refs #255 2018-05-16 08:27:24 -07:00
full_text_search.rst Standardize on 'query string', not 'querystring', in docs 2021-01-11 13:33:54 -08:00
getting_started.rst Link to global-power-plants demo instead of sf-trees 2020-10-31 15:24:54 -07:00
index.rst No longer using Wiki for examples 2020-12-10 15:20:43 -08:00
installation.rst Markup fix, refs #1320 2021-05-24 11:15:15 -07:00
internals.rst skip_csrf(datasette, scope) plugin hook, refs #1377 2021-06-23 15:40:09 -07:00
introspection.rst Updated docs renaming config to settings 2020-11-24 13:22:33 -08:00
json_api.rst ?_trace=1 now depends on trace_debug setting, closes #1359 2021-06-05 13:18:37 -07:00
Makefile Added documentation on the Datasette Ecosystem 2019-01-31 19:36:07 -08:00
metadata.rst Standardize on 'query string', not 'querystring', in docs 2021-01-11 13:33:54 -08:00
pages.rst Standardize on 'query string', not 'querystring', in docs 2021-01-11 13:33:54 -08:00
performance.rst Standardize on 'query string', not 'querystring', in docs 2021-01-11 13:33:54 -08:00
plugin_hooks.rst New get_metadata() plugin hook for dynamic metadata 2021-06-26 15:24:54 -07:00
plugins.rst Shrunk ecosystem docs in favour of datasette.io, closes #1182 2021-01-09 14:17:18 -08:00
publish.rst Added --app to fly install command. (#1279) 2021-03-28 17:11:55 -07:00
settings.rst ?_trace=1 now depends on trace_debug setting, closes #1359 2021-06-05 13:18:37 -07:00
spatialite.rst Fix links in SpatiaLite tutorial, closes #1278 2021-03-27 09:16:45 -07:00
sql_queries.rst Release 0.55 2021-02-18 18:01:06 -08:00
testing_plugins.rst Fixed typo 2021-02-22 09:35:41 -08:00
writing_plugins.rst Note about where to find plugin examples, closes #1244 2021-02-26 09:27:09 -08:00