Better Django forms — modern styling out of the box, then HTMX integration for dynamic behavior
Project description
django-formwork
django-formwork applies DaisyUI styling to Django forms and ships a small set of widgets that lean on htmx and Alpine.js. Set FORM_RENDERER once, include the CSS and JS template tags, and {{ form }} produces DaisyUI markup. The admin is unaffected; it renders widgets directly, never {{ form }} or as_field_group().
Quick start
pip install django-formwork
# settings.py
INSTALLED_APPS = [..., "django_formwork"]
FORM_RENDERER = "django_formwork.FormworkRenderer"
{% load formwork %}
{% formwork_css %}
{{ form }}
{% formwork_js %}
Widgets
Toggle, Range, Rating, PasswordReveal, SearchSelect, MultiSelect, ComboBox, DataList, FileDropZone, ImageDropZone, ValidatedTextarea, DatePicker, InputNumber, InputMask, OTPInput, PhoneInput, CountryInput. The three dropdown widgets auto-register a server-side search endpoint when used on a FormworkForm. ValidatedTextarea does the same for live server-side text validation.
htmx 4 integration
{% formwork_js %} loads formwork.js as an ES module. It imports formwork-core.js (the formwork-morph htmx extension, dirty-field tracking, native validation disabling) and each widget's Alpine component. Per-form {{ form.media }} and bundler imports are also supported; details are in the installation docs.
Requirements
Python 3.14+, Django 6.0, DaisyUI 5, Tailwind CSS 4. DaisyUI and Tailwind are not bundled.
Documentation
https://oliverhaas.github.io/django-formwork/
Contributing
Screenshot baselines under tests/widgets/screenshots/ use Git LFS. Install it once globally before cloning:
sudo apt install git-lfs # or brew install git-lfs
git lfs install
If you cloned before installing LFS, run git lfs install && git lfs pull to fetch the PNG bytes.
License
BSD 3-Clause. See 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_formwork-0.1.0a2.tar.gz.
File metadata
- Download URL: django_formwork-0.1.0a2.tar.gz
- Upload date:
- Size: 64.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc6544bcd3fdcf6006c2497f700662e7b371dd6526adaaa55d5b0ef40f65b643
|
|
| MD5 |
ea2e55cf95e382f7eeabf8a9ad96fb2b
|
|
| BLAKE2b-256 |
d26017ee6ad55960aa42073a7b60a0b0ece00d010526d4b8af9d9dd31191cdc4
|
Provenance
The following attestation bundles were made for django_formwork-0.1.0a2.tar.gz:
Publisher:
publish.yml on oliverhaas/django-formwork
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_formwork-0.1.0a2.tar.gz -
Subject digest:
bc6544bcd3fdcf6006c2497f700662e7b371dd6526adaaa55d5b0ef40f65b643 - Sigstore transparency entry: 1567106999
- Sigstore integration time:
-
Permalink:
oliverhaas/django-formwork@633fd9a3cd7409335d40c4add393dbeaf34c34db -
Branch / Tag:
refs/heads/main - Owner: https://github.com/oliverhaas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@633fd9a3cd7409335d40c4add393dbeaf34c34db -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file django_formwork-0.1.0a2-py3-none-any.whl.
File metadata
- Download URL: django_formwork-0.1.0a2-py3-none-any.whl
- Upload date:
- Size: 99.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44e345b2c62e884b158f8bef8af77b57aa0450b0eaa06d13803dbd551b57d607
|
|
| MD5 |
3b89da13180db59cccd6d510b0e31609
|
|
| BLAKE2b-256 |
5cf46aa67169a51d649182af102c2cbae862d63c17910833237573e0f41ea194
|
Provenance
The following attestation bundles were made for django_formwork-0.1.0a2-py3-none-any.whl:
Publisher:
publish.yml on oliverhaas/django-formwork
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_formwork-0.1.0a2-py3-none-any.whl -
Subject digest:
44e345b2c62e884b158f8bef8af77b57aa0450b0eaa06d13803dbd551b57d607 - Sigstore transparency entry: 1567107025
- Sigstore integration time:
-
Permalink:
oliverhaas/django-formwork@633fd9a3cd7409335d40c4add393dbeaf34c34db -
Branch / Tag:
refs/heads/main - Owner: https://github.com/oliverhaas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@633fd9a3cd7409335d40c4add393dbeaf34c34db -
Trigger Event:
workflow_dispatch
-
Statement type: