datasette-checkbox by datasette
339 downloads this week Star
README source code
Add interactive checkboxes to columns in Datasette. Requires Datasette 1.0 alpha or higher.
Install this plugin in the same environment as Datasette.
datasette install datasette-checkbox
This plugin adds checkboxes to the table and row pages in Datasette for any column with a name that starts is_*
or should_*
or has_*
and that is of type integer
.
Toggling those checkboxes updates the underlying column to a 1
or a 0
.
The checkbox interface will only be shown for users who have update-row
permission for the table.
The easiest way to try this plugin is using the --root
Datasette option:
datasette data.db --root
Or use the Datasette permission system to grant update-row
to specific users.
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd datasette-checkbox
python3 -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest