{"id":23561,"library":"django-bootstrap-v5","title":"django-bootstrap-v5","description":"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.","status":"active","version":"1.0.11","language":"python","source_language":"en","source_url":"https://github.com/zelenij/django-bootstrap-v5","tags":["django","bootstrap5","forms","templatetags","django-bootstrap5"],"install":[{"cmd":"pip install django-bootstrap-v5","lang":"bash","label":"latest PyPI"},{"cmd":"pip install django-bootstrap-v5==1.0.11","lang":"bash","label":"pinned version"}],"dependencies":[{"reason":"Core dependency; tested with Django 2.2–4.2","package":"Django","optional":false},{"reason":"Bootstrap 5 CSS/JS (not a Python package; manual inclusion required)","package":"bootstrap5","optional":true}],"imports":[{"note":"bootstrap5 is not a top-level Python import; the templatetags module is used in templates, not Python code.","wrong":"from bootstrap5 import ...","symbol":"bootstrap5","correct":"from django_bootstrap5.templatetags import bootstrap5"}],"quickstart":{"code":"# settings.py\nINSTALLED_APPS = [\n    ...\n    'django_bootstrap5',\n]\n\n# template.html\n{% load django_bootstrap5 %}\n<form action=\".\" method=\"post\">\n  {% csrf_token %}\n  {% bootstrap_form form %}\n  {% bootstrap_button button_type=\"submit\" content=\"Submit\" %}\n</form>","lang":"python","description":"Add 'django_bootstrap5' to INSTALLED_APPS, then use template tags to render Bootstrap 5 forms and buttons."},"warnings":[{"fix":"Replace {% load bootstrap5 %} with {% load django_bootstrap5 %} in all templates.","message":"Template tag library name changed from 'bootstrap5' to 'django_bootstrap5' in v1.0.0. Old {% load bootstrap5 %} will raise TemplateSyntaxError.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Use the 'required' and 'disabled' arguments in form field configuration or Bootstrap form rendering.","message":"The 'set_required' and 'set_disabled' filters are deprecated and will be removed in v2.0.","severity":"deprecated","affected_versions":">=1.0.0"},{"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\">).","message":"Bootstrap 5 CSS/JS must be included manually in your base template; this library only provides Django template tags, not the frontend assets.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure SECRET_KEY is set in settings.py.","message":"If Django's SECRET_KEY is not set, the bootstrap5 templatetags may raise a RuntimeError during startup.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"pip install django-bootstrap-v5 and add 'django_bootstrap5' to INSTALLED_APPS.","cause":"Package not installed or not added to INSTALLED_APPS.","error":"ModuleNotFoundError: No module named 'django_bootstrap5'"},{"fix":"Change to {% load django_bootstrap5 %}","cause":"Using old {% load bootstrap5 %} syntax.","error":"TemplateSyntaxError: 'bootstrap5' is not a registered tag library. Must be one of: ..."},{"fix":"Remove duplicate INSTALLED_APPS entry.","cause":"Duplicate entry of 'django_bootstrap5' in INSTALLED_APPS or another app with same label.","error":"django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: django_bootstrap5"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}