Registry / web-framework / django-bootstrap-v5

django-bootstrap-v5

JSON →
library1.0.11pypypi✓ verified 81d ago

Django template tags and filters for Bootstrap 5 integration. Version 1.0.11, released Mar 2023. Low maintenance cadence; supports Bootstrap 5.0–5.3.

pip install django-bootstrap-v5
INSTALL
IMPORT
SIG · DJANGO-BOOTSTRAP-V
D
django-bootstrap-v5
web-frameworkpythonv1.0.11
Install
3.5s avg
Import
Disk
65MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.11 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 66MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 3.5s · import 0.000s · 67MB
65MB installed
● package 65MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PACKAGE_NAME
from bootstrap5 import PACKAGE_NAME
from django_bootstrap5.templatetags import bootstrap5
metadata
from bootstrap5 import metadata
package_metadata
from bootstrap5 import package_metadata

Add 'django_bootstrap5' to INSTALLED_APPS, then use template tags to render Bootstrap 5 forms and buttons.

# settings.py INSTALLED_APPS = [ ... 'django_bootstrap5', ] # template.html {% load django_bootstrap5 %} <form action="." method="post"> {% csrf_token %} {% bootstrap_form form %} {% bootstrap_button button_type="submit" content="Submit" %} </form>
Debug
Known issues
breakingTemplate tag library name changed from 'bootstrap5' to 'django_bootstrap5' in v1.0.0. Old {% load bootstrap5 %} will raise TemplateSyntaxError.
fix
Replace {% load bootstrap5 %} with {% load django_bootstrap5 %} in all templates.
affects: >=1.0.0
deprecatedThe 'set_required' and 'set_disabled' filters are deprecated and will be removed in v2.0.
fix
Use the 'required' and 'disabled' arguments in form field configuration or Bootstrap form rendering.
affects: >=1.0.0
gotchaBootstrap 5 CSS/JS must be included manually in your base template; this library only provides Django template tags, not the frontend assets.
fix
Add Bootstrap 5 CSS/JS via CDN or static files in your base HTML (e.g., <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">).
affects: all
gotchaIf Django's SECRET_KEY is not set, the bootstrap5 templatetags may raise a RuntimeError during startup.
fix
Ensure SECRET_KEY is set in settings.py.
affects: all
Upgrade
Version history
1.0.11latest on PyPI · released Feb 10, 2022
Audit
Dependencies
DjangorequiredCore dependency; tested with Django 2.2–4.2
bootstrap5optionalBootstrap 5 CSS/JS (not a Python package; manual inclusion required)
Agent activity
7 hits · last 30 days
node
6
Resources
django-bootstrap-v5 — pip install django-bootstrap-v5 · libregistry