This release is a pre-release and may not be stable for production use.
django-formwork
django-formwork is an opinionated UI framework for Django, built on Django forms. Forms are the central building block of most Django apps (CRUD pages, admin, search filters, sign-ups, content editors), so formwork treats the form as the primary UI surface. Define a Form or ModelForm and you get DaisyUI styling, widgets that go beyond Django's built-ins (dropdowns with server-side search, drop zones, OTP, date range, date picker, server-validated textarea, and more), and the htmx + Alpine wiring that makes them dynamic without bespoke per-page JS. Set FORM_RENDERER once, build the CSS, include the JS template tag, and {{ form }} produces the full 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.forms", "django_iconx", "django_formwork"]
FORM_RENDERER = "django_formwork.FormworkRenderer"
"django.forms" gives the renderer Django's own widget templates. The DjangoTemplates backend must find app templates (APP_DIRS=True or the app_directories loader).
{% load formwork static %}
<head>
<link rel="stylesheet" href="{% static 'dist.css' %}">
<script src="https://unpkg.com/htmx.org@4.0.1/dist/htmx.min.js"></script>
<script src="https://unpkg.com/htmx.org@4.0.1/dist/ext/hx-alpine-compat.min.js"></script>
{% formwork_js %}
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3/dist/cdn.min.js"></script>
</head>
...
{{ form }}
dist.css is your Tailwind build of formwork's formwork.css. The package ships only that Tailwind source, and the installation docs show the build entry point.
Keep the scripts in this order. htmx's alpine-compat extension is required: without it a morph strips what Alpine wrote into the DOM. {% formwork_js %} must run before Alpine, so that its alpine:init listeners exist when Alpine starts.
Widgets
Select, SelectMultiple, ComboBox, ComboBoxMultiple, TextInput, Textarea, PasswordInput, SearchInput, DateInput, DateRangeInput, DatePicker, StepperNumberInput, SuffixNumberInput, CheckboxInput, ToggleInput, CheckboxSelectMultiple, CardRadioSelect, CardCheckboxSelectMultiple, FileDropzoneInput, ImageDropzoneInput, OTPInput, InputMask, Range, Rating, DataList, ValidatedTextarea and Display. The names shadow django.forms on purpose, so import the module: from django_formwork import widgets, then widgets.Select.
Select, SelectMultiple, ComboBox and ComboBoxMultiple search on the server when the widget gets a search_queryset. A FormworkForm or FormworkModelForm class registers the search when Python creates it, and one include("django_formwork.urls") serves every search. ValidatedTextarea posts its text to a FormworkValidateView subclass for live server-side 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 the Alpine component of each widget. Per-form {{ form.media }} and bundler imports also work; the installation docs describe all three paths. {% formwork_sections_js %} adds section forms: several forms on one page that each autosave their own fields of one row.
Requirements
Python 3.14+, Django 6.0 or 6.1, DaisyUI 5, Tailwind CSS 4. DaisyUI and Tailwind are not bundled.
Development
uv sync
uv run pytest -m "not screenshot and not benchmark"
The PostgreSQL run covers search_ranked. Django connects through libpq, so set PGHOST, PGUSER and PGPASSWORD; the test database is named formwork, and the suite creates the pg_trgm extension in it:
uv run pytest tests/ --ds settings.postgres -m "not screenshot and not benchmark and not e2e" -n auto --no-cov
Documentation
https://oliverhaas.github.io/django-formwork/
License
BSD 3-Clause. See LICENSE.
Metadata
Release files for django-formwork 0.1.0a3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_formwork-0.1.0a3.tar.gz | 97.8 kB | With provenance | Details for django_formwork-0.1.0a3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_formwork-0.1.0a3-py3-none-any.whl | Python 3 | none | any | Details for django_formwork-0.1.0a3-py3-none-any.whl |
Total release size: 239.1 kB
Release files / django_formwork-0.1.0a3.tar.gz
| Download URL | django_formwork-0.1.0a3.tar.gz |
|---|---|
| Size | 97.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce4d701c6ac239df721eee425862c5190a4058fe3b7ec47998201df747934ef1
|
|
BLAKE2b-256 checksum How to use checksums |
f3aa7ca2b954033cd26a4199064e3f6454bd41cdcc9879e2a497a056fcf31106
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logRelease files / django_formwork-0.1.0a3-py3-none-any.whl
| Download URL | django_formwork-0.1.0a3-py3-none-any.whl |
|---|---|
| Size | 141.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
19c1bf147e27b1de21127c1cce1592ae4edbda1875698623ffc320cba6b3c53a
|
|
BLAKE2b-256 checksum How to use checksums |
987d35c36e9bdd03990e09607715fbe2f86d1378298802ffe4f0dc0df55d843d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logSecurity for django-formwork 0.1.0a3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for django_formwork-0.1.0a3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.