django-bootstrap5
Bootstrap 5 for Django
What it is and what it does
django-bootstrap5 is a Django app that bridges Django's form rendering and Bootstrap 5's component library. It provides template tags like `bootstrap_form`, `bootstrap_button`, and others that automatically wrap Django form fields and UI elements in Bootstrap-compliant HTML, eliminating the need to hand-code Bootstrap classes and structure in templates.
The package is designed for developers building Django web applications who want Bootstrap 5 styling without manually writing Bootstrap markup. It integrates as a single runtime dependency (django) and is installed as a Django app in INSTALLED_APPS. The template tags handle form rendering, button styling, and other common Bootstrap components, reducing boilerplate and keeping templates cleaner.
Use it for:
- Quickly style Django forms with Bootstrap 5 without writing custom HTML for each form field.
- Build consistent, responsive admin or user-facing interfaces using Bootstrap components in Django templates.
- Reduce template boilerplate by replacing manual Bootstrap class markup with simple template tags.
- Maintain a uniform look across a Django project by centralizing Bootstrap component rendering.
- Prototype or iterate on Django UIs rapidly without custom CSS or HTML scaffolding.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides Django template tags and filters to render Bootstrap 5 components (forms, buttons, alerts) with minimal markup, integrating Bootstrap's CSS framework directly into Django templates.
Yes. Low install friction, active maintenance, no known vulnerabilities, and permissive licensing make this a safe choice. It directly solves the common problem of integrating Bootstrap 5 into Django templates. Install it if you are building a Django application and want Bootstrap styling without hand-coding markup.
Install
django-bootstrap5 on PyPI
pip
pip install django-bootstrap5uv
uv add django-bootstrap5poetry
poetry add django-bootstrap5Installing django-bootstrap5
Before you install
Low friction: pure Python wheel, single runtime dependency on django. Actively maintained with recent commits; marked production-ready and supports current Django versions (4.2, 5.2, 6.0) and Python 3.10–3.14.
License in practice
BSD-3-Clause is permissive; you may use, modify, and distribute this package freely in commercial and open-source projects with minimal restrictions, provided you retain the license notice.
Quickstart
pip install django-bootstrap5
# In settings.py, add to INSTALLED_APPS:
INSTALLED_APPS = (
"django_bootstrap5",
)
# In a template:
{% load django_bootstrap5 %}
{% bootstrap_form form %}
{% bootstrap_button button_type="submit" content="OK" %}
Requires Django version currently supported by the Django project (4.2, 5.2, or 6.0) and Python 3.10 or later.
Verify before relying
- Whether Bootstrap 5 CSS/JS must be included separately in the template or if this package bundles it.
- Support for custom Bootstrap theming or variable overrides beyond default styling.
- Performance impact when rendering large forms or complex Bootstrap components.
Package facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — django |
| Maintenance | actively maintained — 187 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 440,666/month — #6,647 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_bootstrap5-26.2-py3-none-any.whl
Keywords: django, bootstrap, bootstrap5
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
django-bootstrap-formRenders Django form fields as Bootstrap-styled…
permissive · top 15,000 on PyPI
django-bootstrap3Provides Django template tags and filters to…
permissive · top 15,000 on PyPI
django-bootstrap4Provides 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-navhelperProvides Django template tags to automatically…
permissive · top 15,000 on PyPI
crispy-bootstrap5Provides Bootstrap 5 form templates and layout…
permissive · top 5,000 on PyPI
django-bootstrap-datepicker-plusProvides Bootstrap-styled date, time, and…
permissive · top 15,000 on PyPI
crispy-bootstrap4Provides Bootstrap 4 HTML templates for…
permissive · top 15,000 on PyPI
crispy-bootstrap3Provides Bootstrap 3 HTML templates for…
permissive · top 15,000 on PyPI
django-leafletIntegrates the Leaflet JavaScript mapping…
copyleft · top 15,000 on PyPI