skillfed

django-bootstrap5

Bootstrap 5 for Django

django-bootstrap5 v26.2 440.7K downloads/30d#6,647 on PyPI450
Permissive license BSD-3-Clause Active released

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-bootstrap5

uv

uv add django-bootstrap5

poetry

poetry add django-bootstrap5

Installing 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

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 4.2Framework :: Django :: 5.2Framework :: Django :: 6.0Intended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: LibrariesTopic :: Utilities

Tags

django bootstrap form renderingbootstrap 5 django templatesdjango form styling bootstrapbootstrap components djangodjango bootstrap template tagsbootstrap form helpers django
django-formsbootstrap-uitemplate-tags

More Libraries packages