Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Bootstrap support for Django projects
JavaScript Python
branch: master

Django Toolkit for integration with Bootstrap v2

PyPi version

PyPi downloads

The easiest way to use Bootstrap v2 in your Django project. What is Bootstrap? You can find out all about it here:

Bootstrap v3

A new app was started to provide support for Bootstrap v3. It is called django-bootstrap3, and you can find it at

Updates for Bootstrap v2

Sinc development on Bootstrap v2 has stopped, it is safe to assume that this Django app won't receive much updates in the future. Everyone using Botstrap is encouraged to upgrade to Bootstrap v3 and


  1. Install using pip:

    pip install django-bootstrap-toolkit


Alternatively, you can add django-bootstrap-toolkit to your requirements.txt.

If you want to hack django-bootstrap itself, clone this repo and call pip install -e ..

Use in templates

{% load bootstrap_toolkit %}

# Using a filter

<form action="/url/to/submit/" method="post">
    {% csrf_token %}
    {{ form|as_bootstrap }}
    <div class="form-actions">
        <button type="submit" class="btn btn-primary">Submit</button>

# Using template tags

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

Use in forms

class TestForm(forms.Form):
    date = forms.DateField(
    title = forms.CharField(
        help_text=u'This is the standard text input',
    uneditable = forms.CharField(
        help_text=u'I am uneditable and you cannot enable me with JS',
    prepended = forms.CharField(
        help_text=u'I am prepended by a P',

More examples

See Django project demo_project/demo_app for more examples.


  • Create a more easy way to customize BootstrapDateInput


Do you have a question about the usage of this toolkit in your Django project? Please ask it on so others can help out and/or learn. Label your question django-bootstrap-toolkit if possible.

Bugs and requests

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


django-bootstrap-toolkit is written by Dylan Verheul (


When building my first Django project with Bootstrap I went looking for available open source applications that connected Django and Bootstrap.

I found The approach to template tags and filters seemed right, but Bootstrap does so much more than just forms.

This is how django-bootstrap-toolkit started. I used ideas from other Django apps. The code was started from scratch.


You can use this under Apache 2.0. See LICENSE file for details.


  • to Twitter, @fat and @mdo for building and releasing Bootstrap
  • to the Django community for Django
  • to the authors of django-bootstrap-form for the inspiration
  • to Stefan Petre and Andy Rowles for the datepicker
Something went wrong with that request. Please try again.