Django bootstrap form

PyPI version

Twitter Bootstrap for Django Form.

A simple Django template tag to work with Bootstrap


Install django-bootstrap-form with pip

$ pip install django-bootstrap-form


Add "bootstrapform" to your INSTALLED_APPS.

At the top of your template load in our template tags:

{% load bootstrap %}

Then to render your form:

Form Title {% csrf_token %} {{ form|bootstrap }}

You can also set class="form-vertical" on the form element.

To use class="form-inline" on the form element, also change the "|boostrap" template tag to "|bootstrap_inline".

It is also possible to create a horizontal form. The form class and template tag are both changed, and you will also need slightly different CSS around the submit button:

Form Title {% csrf_token %} {{ form|bootstrap_horizontal }}


Checkout this Demo site to see it in action.

Download source code from Github

Download ZIP

Submit resources