Skip to main content

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.

demo-view

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

  1. Install the package using pip:
pip install django-crispy-formset-modal
  1. Add crispy_formset_modal to your INSTALLED_APPS in settings.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.

  1. Clone this repository:

    git clone https://github.com/blasferna/django-crispy-formset-modal.git
    cd django-crispy-formset-modal
    
  2. Set up the project environment:

    uv sync --dev
    

    This single command will:

    • Create a virtual environment in .venv if one doesn't exist.
    • Install all project and development dependencies specified in pyproject.toml into the environment.
  3. Run development tasks with uv run:

    The uv run command 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
    
  4. Explore the demo:

    Visit http://localhost:8000 in your browser to see the application.

License

Django Crispy Formset Modal is released under the MIT License.

Download files

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

Source Distribution

django_crispy_formset_modal-0.16.tar.gz (44.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_crispy_formset_modal-0.16-py3-none-any.whl (57.2 kB view details)

Uploaded Python 3

File details

Details for the file django_crispy_formset_modal-0.16.tar.gz.

File metadata

  • Download URL: django_crispy_formset_modal-0.16.tar.gz
  • Upload date:
  • Size: 44.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","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}

File hashes

Hashes for django_crispy_formset_modal-0.16.tar.gz
Algorithm Hash digest
SHA256 996a7831d97a06f1f840cbeca3868b0b66b0f91e72680a2a6318d6ca8b25e6f6
MD5 6f8e912d83efcbb5a7d09dcf967ccf5d
BLAKE2b-256 f96c151dcbc61039d3526e94c778c62daf355e861fff09d91ca7362115823a2b

See more details on using hashes here.

File details

Details for the file django_crispy_formset_modal-0.16-py3-none-any.whl.

File metadata

  • Download URL: django_crispy_formset_modal-0.16-py3-none-any.whl
  • Upload date:
  • Size: 57.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","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}

File hashes

Hashes for django_crispy_formset_modal-0.16-py3-none-any.whl
Algorithm Hash digest
SHA256 8b7518e74b2911bc96e9ca279293b89b0813d47b03a5a82e7ae547335f5a9ec1
MD5 e12f96c5f857333491170e22caefcc4d
BLAKE2b-256 b62b333886043d3e8c7c8ca424b2500b56c0493a1c3e90c51100a4485fa77c14

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.16 This release

2 files

0.15

2 files

0.14

2 files

0.13

2 files

0.12

2 files

0.11

2 files

0.10

2 files

0.8

2 files

0.7

2 files

0.6

2 files

0.5

2 files

0.4

2 files

0.3

2 files

0.2

2 files

0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page