commits: baf986c871708c01ca183be760995cf306ba21bf

This data as json

sha message author_date committer_date raw_author raw_committer repo author committer
baf986c871708c01ca183be760995cf306ba21bf 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-26T22:24:54Z 2021-06-26T22:24:54Z 121af5c26cc703f7b3d7219091a8e71dc39db899 cd792325681cbad9f663f2879d8b69f1edbb678f 107914493 2670795 19864447