Skip to content

Latest commit

 

History

History
60 lines (41 loc) · 2.09 KB

README.md

File metadata and controls

60 lines (41 loc) · 2.09 KB

datasette-metadata-editable

PyPI Changelog Tests License

A Datasette plugin for editing instance, database and table metadata. Currently requires Datasette 1.0a14 or higher.

Installation

Install this plugin in the same environment as Datasette.

datasette install datasette-metadata-editable

Usage

This plugin must be used with a persistent internal.db database. If you don't configure Datasette in this way any changes made to metadata will be lost when the server restarts.

Be sure to start Datasette something like this:

datasette --internal internal.db

Users with the datasette-metadata-editable-edit permission will see action menu items for editing the metadata attached to the instance, a database or a table.

An easy way to test the plugin is like this, which will allow even logged out users to edit metadata:

datasette --internal internal.db -s permissions.datasette-metadata-editable-edit true

Or to restrict edits to the root user:

datasette --internal internal.db -s permissions.datasette-metadata-editable-edit.id root --root

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd datasette-metadata-editable
python3 -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest