django-crispy-forms
Best way to have Django DRY forms
What it is and what it does
django-crispy-forms is a Django application that lets you build form layouts programmatically instead of writing HTML in templates. It provides a filter and template tag that render forms with full control over the output HTML while keeping your code DRY and maintainable. The package abstracts form rendering into reusable layout components, so you define form structure in Python rather than templates.
It integrates with multiple CSS frameworks—Bootstrap (versions 2, 3, and 4), Tailwind, Bulma, and Foundation—and lets you switch between them using a Django setting. You can also create custom template packs for your own framework. The package respects Django's standard form API, so it works alongside other form libraries without conflicts.
Use it for:
- Render Django forms with Bootstrap styling without manually writing HTML in templates.
- Build reusable form layout components that can be shared across multiple views and templates.
- Switch CSS frameworks by changing a single Django setting without modifying form code.
- Create custom form layouts with programmatic control over field grouping, ordering, and HTML attributes.
- Maintain DRY form code when working on projects with complex or repetitive form structures.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Renders Django forms programmatically with full HTML control using reusable layout components, supporting multiple CSS frameworks without writing templates.
Yes. django-crispy-forms is actively maintained, has no known vulnerabilities, low install friction, and a permissive MIT license. It solves a real Django problem—form rendering without template boilerplate—and is widely used (top 5000 PyPI packages). Install it if you're building Django forms and want to avoid writing HTML templates.
Install
django-crispy-forms on PyPI
pip
pip install django-crispy-formsuv
uv add django-crispy-formspoetry
poetry add django-crispy-formsInstalling django-crispy-forms
Before you install
Low install friction with a single dependency on django. Active maintenance—last commit 2026-07-29, released 16 days ago, with 5160 repository stars. Supports current Python versions (3.10+) and recent Django releases (5.2, 6.0, 6.1).
License in practice
MIT license (permissive) allows commercial and private use with minimal restrictions—suitable for most projects without legal concern.
Quickstart
pip install django-crispy-forms
from django import forms
class MyForm(forms.Form):
name = forms.CharField()
# In template: {{ form|crispy }} or {% crispy form %}
Requires Django 5.2+ and Python 3.10+; a frontend template pack must be installed separately for CSS framework support.
Verify before relying
- Whether the package is actively maintained beyond the recent release date or if activity is sporadic.
- Performance characteristics when rendering large forms or complex nested layouts.
- Compatibility details with custom or less common CSS frameworks beyond those mentioned.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — django |
| Maintenance | actively maintained — 16 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,298,894/month — #2,667 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_crispy_forms-2.7-py3-none-any.whl
Keywords: forms, django, crispy, DRY
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
crispy-bootstrap4Provides Bootstrap 4 HTML templates for…
permissive · top 15,000 on PyPI
django-formtoolsdjango-formtools provides high-level form…
permissive · top 5,000 on PyPI
crispy-bootstrap5Provides Bootstrap 5 form templates and layout…
permissive · top 5,000 on PyPI
crispy-tailwindProvides Tailwind CSS styling templates for…
permissive · top 15,000 on PyPI
crispy-bootstrap3Provides Bootstrap 3 HTML templates for…
permissive · top 15,000 on PyPI
django-bootstrap-formRenders Django form fields as Bootstrap-styled…
permissive · top 15,000 on PyPI
django-bootstrap-datepicker-plusProvides Bootstrap-styled date, time, and…
permissive · top 15,000 on PyPI
django-bootstrap5Provides Django template tags and filters to…
permissive · top 15,000 on PyPI
Bootstrap-FlaskBootstrap-Flask provides Jinja macros that…
permissive · top 15,000 on PyPI
django-bootstrap3Provides Django template tags and filters to…
permissive · top 15,000 on PyPI