Metadata-Version: 2.4
Name: django-crispy-tableselect
Version: 0.2.0
Summary: Crispy layout object for selecting rows in a table
Project-URL: Changelog, https://github.com/Stormbase/django-crispy-tableselect/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/Stormbase/django-crispy-tableselect/issues
Project-URL: Source, https://github.com/Stormbase/django-crispy-tableselect
Author-email: "Storm B. Heg" <storm@stormbase.digital>
License-Expression: MIT
License-File: LICENSE
Keywords: crispy-forms,django
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 5.2
Classifier: Framework :: Django :: 6.0
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Requires-Dist: django-crispy-forms>=2.0
Requires-Dist: django-tables2>=2.4
Requires-Dist: django>=5.2
Provides-Extra: testing
Requires-Dist: beautifulsoup4<5,>=4.12; extra == 'testing'
Requires-Dist: coverage<8,>=7.2; extra == 'testing'
Requires-Dist: crispy-bootstrap5>=2024.2; extra == 'testing'
Requires-Dist: dj-database-url<3,>=2.1.0; extra == 'testing'
Requires-Dist: django-csp>=3.8; extra == 'testing'
Requires-Dist: django-debug-toolbar<7,>6; extra == 'testing'
Requires-Dist: django-formtools>=2.4; extra == 'testing'
Requires-Dist: factory-boy<4,>=3.2; extra == 'testing'
Requires-Dist: psycopg<4,>=3.0; extra == 'testing'
Requires-Dist: pytest-django<5,>4.5; extra == 'testing'
Requires-Dist: pytest-env<1,>=0.6.2; extra == 'testing'
Requires-Dist: pytest-randomly<4,>=3.15; extra == 'testing'
Requires-Dist: pytest<10,>9; extra == 'testing'
Requires-Dist: ruff<0.16,>0.15; extra == 'testing'
Requires-Dist: tox<5,>=4.14; extra == 'testing'
Description-Content-Type: text/markdown

# Django Crispy TableSelect

[![CI](https://github.com/Stormbase/django-crispy-tableselect/actions/workflows/test.yml/badge.svg)](https://github.com/Stormbase/django-crispy-tableselect/actions/workflows/test.yml)
[![codecov](https://codecov.io/gh/Stormbase/django-crispy-tableselect/graph/badge.svg?token=D2SFHA4QEL)](https://codecov.io/gh/Stormbase/django-crispy-tableselect)

_Note:_ this package is under heavy development and currently in proof-of-concept phase.

Crispy layout object for selecting rows in a [django-tables2](https://github.com/jieter/django-tables2/) data table.

<center>
    <img width="900" src="./docs/images/demo.gif" alt="Animation showing a table with rows that are selected all at once and then unchecked one-by-one.">
</center>

## Todo list

- [ ] Write documentation (d'oh)
- [x] ~~Publish to PyPI~~
- [x] ~~Add checkbox in table header to select/de-select all rows at once.~~
- [ ] Add tests
- [ ] Audit accessibility

## Development setup

### Requirements

- At least python 3.9 (pyenv managed recommended)

### Install the django app with poetry

```bash
pyenv virtualenv 3.9 django-tableselect  # or your alternative to create a venv
pyenv activate django-tableselect
pip install poetry
make install

# Optional, when you're not creating the virtualenv yourself poetry will do it for you.
# You can activate the poetry venv like so:
source $(poetry env info --path)/bin/activate
```

### Linting and formatting

Ruff is configured. Run it with

```bash
make format
```

### Test

Pytest with coverage is default enabled

```bash
make test
```

### Run the django development server (sandbox)

First run the migrations:

```bash
make migrate
```

Now create a superuser:

```bash
sandbox/manage.py createsuperuser
```

Finally run the django dev server:

```bash
sandbox/manage.py runserver
```

You can now go to the django admin site: http://localhost:8000/admin
