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_* 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.1a1.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file datasette_checkbox-0.1a1.tar.gz.

File metadata

  • Download URL: datasette_checkbox-0.1a1.tar.gz
  • Upload date:
  • Size: 7.9 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.1a1.tar.gz
Algorithm Hash digest
SHA256 89141b82562382515ab1a54f37893065eb27dc21be760e9fc048c56c74121eca
MD5 f6126a1dde706494fc7bf2cadf2334dc
BLAKE2b-256 d19b20923cbb0b46d296527ca9f17898a746ba013ac14fd64aac3b855259d4b3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for datasette_checkbox-0.1a1-py3-none-any.whl
Algorithm Hash digest
SHA256 628600397046d7614680c52d8e58ffd9278eb4c7b4b36249de668f3004b6301f
MD5 0221432547a2117e41f501ea429ba667
BLAKE2b-256 61631bb14754615d9021aacf9ff9afe46ecc457f2d466505b913451a4559fe85

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