Skip to main content

Bootstrap 4 for Django

Project description

django-bootstrap 4

CI Coverage Status Latest PyPI version Any color you like

Bootstrap 4 integration for Django.


The goal of this project is to seamlessly blend Django and Bootstrap 4.


This package requires a combination of Python and Django that is currently supported.

See "Supported Versions" on


The full documentation is at


  1. Install using pip:
pip install django-bootstrap4

Alternatively, you can install download or clone this repo and call pip install -e ..

  1. Add to INSTALLED_APPS in your
  # ...
  # ...
  1. In your templates, load the bootstrap4 library and use the bootstrap_* tags. See example below.

Example template

{% load bootstrap4 %}

{# Display a form #}

<form action="/url/to/submit/" method="post" class="form">
    {% csrf_token %}
    {% bootstrap_form form %}
    {% buttons %}
        <button type="submit" class="btn btn-primary">Submit</button>
    {% endbuttons %}


An example application app is provided in example. You can run it with make example.

Bugs and suggestions

If you have found a bug or if you have a request for additional functionality, please use the issue tracker on GitHub.


You can use this under BSD-3-Clause. See LICENSE file for details.


Developed and maintained by Zostera.

Original author: Dylan Verheul.

Thanks to everybody that has contributed pull requests, ideas, issues, comments and kind words.

Please see AUTHORS for a list of contributors.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_bootstrap4-23.2.tar.gz (19.9 kB view hashes)

Uploaded source

Built Distribution

django_bootstrap4-23.2-py3-none-any.whl (24.5 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page