Django app that provides an easy way to manage and manipulate formsets using modals with Django Crispy Forms.
Project description
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.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_crispy_formset_modal-0.14.tar.gz.
File metadata
- Download URL: django_crispy_formset_modal-0.14.tar.gz
- Upload date:
- Size: 41.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07670c87d581b7ba6a16aaecf097665da861fefc490a8590194ff3b19eb23a70
|
|
| MD5 |
2aaba42406b02af51480254f30d3d7fd
|
|
| BLAKE2b-256 |
2912e2a0c0385dec41a3b05da94d5079aed098d8a60a7ba717dcb5d10eb4e645
|
File details
Details for the file django_crispy_formset_modal-0.14-py3-none-any.whl.
File metadata
- Download URL: django_crispy_formset_modal-0.14-py3-none-any.whl
- Upload date:
- Size: 52.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53bbc2b79ec39458a7b334070f919bacefb4df992dea23304eb6fe74dc1a0b84
|
|
| MD5 |
01e8310c2aab8eac9eb4175f687b56d0
|
|
| BLAKE2b-256 |
beecc32763568b7fa082d9b6d3ed126c5b74b138db2f02bfa255415f4e10f3be
|