Add interactive checkboxes to columns in Datasette
Project description
datasette-checkbox
Add interactive checkboxes to columns in Datasette. Requires Datasette 1.0 alpha or higher.
Installation
Install this plugin in the same environment as Datasette.
datasette install datasette-checkbox
Usage
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.
Development
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file datasette_checkbox-0.1a2.tar.gz
.
File metadata
- Download URL: datasette_checkbox-0.1a2.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ea626cffb3173f66fa3eaccedabc27b8618ef4134616870478d970914f5492a |
|
MD5 | 81ac2dd578b72d017ca1cff412f1575d |
|
BLAKE2b-256 | c98a85e501a67c0d7f22e214fe5171be17ad5a13ac3036dc9cdbf224f4df86af |
File details
Details for the file datasette_checkbox-0.1a2-py3-none-any.whl
.
File metadata
- Download URL: datasette_checkbox-0.1a2-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6496e48f9071774c56ba86640f980055b9a8c232f1275c7d2a29bb5b69063fb6 |
|
MD5 | 79018c28a57be19fd32d2e521d9ff793 |
|
BLAKE2b-256 | 42943dedeb5cfad622b9b64020a6187354329a7cebce67d7df86f026ac499684 |