Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Bootstrap theme support for Django.

Project Description


Bootstrap theme support for Django, includes themes from Bootswatch.

* Bootstrap (
* Bootswatch (


django-bootstrap-themes can be installed via pip:

pip install django-bootstrap-themes

or by copying the `bootstrap_themes` directory into your Django project.


To configure django-bootstrap-themes in your project, first add it to
the installed apps in your Django settings:

# Django apps
# Other apps

Once you've added it to your installed apps, you can use the template
tags to get the CSS and JS files for Bootstrap:

* Loading the templatetags

{% load bootstrap_themes %}

* Getting the CSS files (use the `theme` parameter to select the theme
and the `type` parameter to choose between CSS, minified CSS, or LESS
format for the stylesheets)

{% bootstrap_styles theme='default' type='min.css' %}
{% bootstrap_styles theme='cosmo' type='css' %}
{% bootstrap_styles theme='united' type='less' %}

* Getting the Javascript files (select minified or not with the
`use_min` parameter)

{% bootstrap_script use_min=True %}

As with any Django templatetags, you can use variables for the
parameters, thus making it easy to switch themes, and even make the
theme user-configurable.

If you want to make the theme user configurable, there is a handy
function to return the list of included themes as a `choices` list for
a `CharField`, like this:

from django.db import models
from bootstrap_themes import list_themes

class MyModel(models.Model):
theme = models.CharField(max_length=255, default='default', choices=list_themes())

Then in your templates, you can use the value of the `theme` field as the
theme parameter to `bootstrap_styles`.

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(950.2 kB) Copy SHA256 Hash SHA256
Egg 3.5 Mar 24, 2016
(890.4 kB) Copy SHA256 Hash SHA256
Source None Mar 24, 2016

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting