Skip to main content

Add interactive checkboxes to columns in Datasette

Project description

datasette-checkbox

PyPI Changelog Tests License

Add interactive checkboxes to columns in Datasette. Requires Datasette 1.0 alpha or higher.

Animated demo showing checkboxes in columns for is_done, should_be_deleted and is_happy - checking the checkboxes shows an updated message next to each one which then fades away.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datasette_checkbox-0.1a2.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

datasette_checkbox-0.1a2-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

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

Hashes for datasette_checkbox-0.1a2.tar.gz
Algorithm Hash digest
SHA256 1ea626cffb3173f66fa3eaccedabc27b8618ef4134616870478d970914f5492a
MD5 81ac2dd578b72d017ca1cff412f1575d
BLAKE2b-256 c98a85e501a67c0d7f22e214fe5171be17ad5a13ac3036dc9cdbf224f4df86af

See more details on using hashes here.

File details

Details for the file datasette_checkbox-0.1a2-py3-none-any.whl.

File metadata

File hashes

Hashes for datasette_checkbox-0.1a2-py3-none-any.whl
Algorithm Hash digest
SHA256 6496e48f9071774c56ba86640f980055b9a8c232f1275c7d2a29bb5b69063fb6
MD5 79018c28a57be19fd32d2e521d9ff793
BLAKE2b-256 42943dedeb5cfad622b9b64020a6187354329a7cebce67d7df86f026ac499684

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page