django-bootstrap3 is a Python library that integrates Bootstrap version 3 into Django projects. It provides template tags and filters to render forms, messages, and other Bootstrap components easily within Django templates. The current version is 26.1, and it maintains a steady release cadence.
pip install django-bootstrap3Verified import paths — ran on the pinned version, not inferred.
To use `django-bootstrap3`, first install it with `pip install django-bootstrap3`. Then, add `'bootstrap3'` to your `INSTALLED_APPS` in `settings.py`. In any Django template where you want to use Bootstrap 3, include `{% load bootstrap3 %}` at the top, and then use tags like `{% bootstrap_css %}`, `{% bootstrap_javascript %}`, `{% bootstrap_messages %}`, and `{% bootstrap_form form %}`. This example demonstrates rendering a form passed as `form` in the template context.
For new projects or projects requiring modern Bootstrap features, use `django-bootstrap4` or `django-bootstrap5` instead. If you must use Bootstrap 3, be fully aware of its EOL status and associated risks.
Ensure `INSTALLED_APPS` in your `settings.py` includes `'bootstrap3'`: `INSTALLED_APPS = ['...', 'bootstrap3', '...']`.
Always place `{% load bootstrap3 %}` as the very first line in any Django template that uses `django-bootstrap3` tags.Include `{% bootstrap_css %}` and `{% bootstrap_javascript %}` in the `<head>` of your base template. For production, ensure `python manage.py collectstatic` has been run and static files are served.