skillfed

django-bootstrap4

Bootstrap 4 for Django

django-bootstrap4 v26.1 401.6K downloads/30d#6,926 on PyPI1,025
Permissive license BSD-3-Clause Active released

What it is and what it does

django-bootstrap4 is a Django template library that bridges Django forms and Bootstrap 4 styling. It provides template tags and filters that automatically render Django form fields, buttons, and other UI elements as properly styled Bootstrap 4 HTML, eliminating the need to manually write Bootstrap markup in your templates.

The package is currently in maintenance mode because Bootstrap 4 has been superseded by Bootstrap 5. This means it will receive bug fixes and security updates but no new features. It depends on django and beautifulsoup4, and requires Python 3.10 or later with a currently supported Django version. The package is straightforward to install and integrate into existing Django projects via a single INSTALLED_APPS entry.

Use it for:

  • Quickly style Django forms with Bootstrap 4 classes without writing custom HTML for each field.
  • Build admin-like interfaces where form rendering consistency matters and Bootstrap 4 is your CSS framework.
  • Migrate a legacy Django project to Bootstrap 4 by replacing manual form markup with template tags.
  • Render Bootstrap 4 buttons, alerts, and other components from Django templates using provided tags.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides Django template tags and filters to render Bootstrap 4 HTML components and forms with minimal markup.

Yes, if you are maintaining an existing Django + Bootstrap 4 project or building a new one that must use Bootstrap 4. The package is stable, actively receives security and bug fixes, and has low install friction. No, if you are starting a new project—use django-bootstrap5 instead, as Bootstrap 4 is superseded and this package will not gain new features.

Install

django-bootstrap4 on PyPI

pip

pip install django-bootstrap4

uv

uv add django-bootstrap4

poetry

poetry add django-bootstrap4

Installing django-bootstrap4

Before you install

Low friction install with two straightforward runtime dependencies (django and beautifulsoup4). Actively maintained with recent commits and receiving bug fixes and security updates despite being in maintenance mode for Bootstrap 4.

License in practice

BSD-3-Clause is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install django-bootstrap4

# In settings.py, add to INSTALLED_APPS:
INSTALLED_APPS = (
    'bootstrap4',
)

# In your template:
{% load bootstrap4 %}
{% bootstrap_form form %}
{% buttons %}Submit{% endbuttons %}

Requires Python 3.10 or later and a supported Django version (4.2, 5.2, or 6.0).

Verify before relying

  • Whether Bootstrap 4 EOL status affects long-term security or feature compatibility for new projects.
  • Specific migration path and effort required to upgrade existing projects from Bootstrap 4 to Bootstrap 5.

Package facts

License BSD-3-Clause (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 2 — django, beautifulsoup4
Maintenance actively maintained — 223 days since the last release
Last repo commit
First released
Downloads 401,585/month — #6,926 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: django_bootstrap4-26.1-py3-none-any.whl

Keywords: django, bootstrap, bootstrap4

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 4 templatesbootstrap form rendering djangodjango bootstrap componentsbootstrap4 template tagsdjango html form stylingbootstrap4 django integration
django-formsbootstrap-uimaintenance-mode

More Libraries packages