django-crispy-formset-modal
Reusable Django app that provides an easy way to manage and manipulate formsets using modals with Django Crispy Forms. It enables you to dynamically add, edit, and delete formsets on the frontend.
Features
- Dynamic formset operations: Add, edit, and delete formsets dynamically in a modal on the frontend.
- Generates an HTML table according to the layout definition, allowing you to determine which fields to display as columns.
- Provides the option to define which numeric fields will be used for a totalizer at the footer of the corresponding field's column.
- Enables mass deletion of records from the HTML table, thanks to the generation of a selection column with checkboxes that can be selected individually or collectively to delete multiple records at once.
- Offers support for various templates packs, including Bootstrap 4, Bootstrap 5, Tailwind, and Bulma.
Dependencies
- Django Crispy Forms: Django Crispy Formset Modal relies on Django Crispy Forms for form rendering
- Django Extra Views: For handling views with formsets.
- jQuery: Used to enable dynamic functionality.
Installation
- Install the package using pip:
pip install django-crispy-formset-modal
- Add
crispy_formset_modalto yourINSTALLED_APPSinsettings.py:
INSTALLED_APPS = [
...
'crispy_formset_modal',
...
]
Usage
For detailed instructions on how to use Django Crispy Formset Modal, please refer to the documentation and check out the demo for practical examples.
Examples
The demo provides various examples of how to use Django Crispy Formset Modal in different scenarios.
Running the Demo App Locally
If you'd like to run the demo application on your local machine. Please follow the steps below:
Instructions
First, you need to have uv installed. If you don't have it, you can install it following the official instructions.
-
Clone this repository:
git clone https://github.com/blasferna/django-crispy-formset-modal.git cd django-crispy-formset-modal -
Set up the project environment:
uv sync --devThis single command will:
- Create a virtual environment in
.venvif one doesn't exist. - Install all project and development dependencies specified in
pyproject.tomlinto the environment.
- Create a virtual environment in
-
Run development tasks with
uv run:The
uv runcommand executes scripts within the project's virtual environment, so you don't need to activate it manually.Apply database migrations:
uv run python manage.py migrate
Start the local development server:
uv run python manage.py runserver
-
Explore the demo:
Visit
http://localhost:8000in your browser to see the application.
License
Django Crispy Formset Modal is released under the MIT License.
Metadata
Release files for django-crispy-formset-modal 0.17
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_crispy_formset_modal-0.17.tar.gz | 44.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_crispy_formset_modal-0.17-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 101.7 kB
Release files / django_crispy_formset_modal-0.17.tar.gz
| Download URL | django_crispy_formset_modal-0.17.tar.gz |
|---|---|
| Size | 44.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
658920c25d58be01825ca8f8a0649d29325db6d8f9221c7ae71bdd8f89530aa9
|
|
BLAKE2b-256 checksum How to use checksums |
e4ba3fffb0ce31f5d5b0285148a0ff3237bfaf731d7fefdd9602a688b101b025
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / django_crispy_formset_modal-0.17-py3-none-any.whl
| Download URL | django_crispy_formset_modal-0.17-py3-none-any.whl |
|---|---|
| Size | 57.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0187470117612a03e545b3ee6839cdb00cf0fbdc402fdaa81b3e226ff188879f
|
|
BLAKE2b-256 checksum How to use checksums |
2458bd19886b546aca96a178fe60419ceac282002d6d0ec787b7c6c8d2040590
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|