Skip to content

bblanchon/django-htmx-modal-form

Repository files navigation

Django+HTMX modal form

This project demonstrates how to show a Django Form in a modal dialog box using HTMX.

A video of the site

This branch contains the Bootstrap 5 version.
See also the Bootstrap 4 version in this repository, or a Tailwind + Alpine.js version in @geoffbeier's fork.

There are two additionnal branches that show how to use this technique with the Django messages framework: with the HX-Trigger technique and with the "OOB swap" technique

Learn more about this technique here:

To run the demo locally:

pipenv install
pipenv run migrate
pipenv run server