Quickstart

After Installation, you can use django-bootstrap3 in your templates.:

Load the bootstrap3 library and use the bootstrap_* tags:

Example template

{# Load the tag library #}
{% load bootstrap3 %}

{# Load CSS and JavaScript #}
{% bootstrap_css %}
{% bootstrap_javascript %}

{# Display django.contrib.messages as Bootstrap alerts #}
{% bootstrap_messages %}

{# 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">
      {% bootstrap_icon "star" %} Submit
    </button>
  {% endbuttons %}
</form>

{# Read the documentation for more information #}

Template tags and filters

Refer to Template tags and filters for more information.

Settings

You can set defaults for django-bootstrap3 in your settings file. Refer to Settings for more information.

Example application

The example application provides a number of useful examples.

https://github.com/dyve/django-bootstrap3/tree/master/example