This aims to be a powerful Django app to ease the integration of the popular Bootstrap UI framework (http://getbootstrap.com).
Project description
django-bootstrap-ui aims to be a powerful Django app to ease the integration of the popular Bootstrap UI framework. It is written in Python and built on the Django web framework.
The code is open source and released under the ISC License (ISCL). It is available on GitHub and follows the guidelines about Semantic Versioning for transparency within the release cycle and backward compatibility whenever possible.
Features
- Full-featured Bootstrap 3 template (3.3.6)
- Latest Font Awesome integration (4.5.0)
- Built-in Bootstrap and Bootswatch themes (3.3.6)
- Ready-to-use Bootstrap component templates
- Intuitive template tag API for generating valid Bootstrap markup
- Extensive and up-to-date documentation
- Mainstream Python (2.7, 3.3, 3.4, 3.5) and Django (1.7, 1.8, 1.9) support
- Outstanding test coverage
- Continuously integrated codebase
Installation
First install the package using pip:
pip install django-bootstrap-ui
Add bootstrap_ui to your INSTALLED_APPS setting:
INSTALLED_APPS = ( ... 'bootstrap_ui', ... )
Usage
Bootstrap template
Prepare your page for Bootstrap and provide your content:
Extend bootstrap-skeleton.html in your base template:
{% extends "bootstrap_ui/bootstrap-skeleton.html" %}
Fill predefined blocks with your content:
{% block body-content %} <h1>Hello, I'm using django-bootstrap-ui!</h1> {% endblock %}
Themes
You can style your page with Bootstrap or Bootswatch themes. Set DJANGO_BOOTSTRAP_UI_THEME to a valid identifier in your settings.py for a project-wide default theme:
# django-bootstrap-ui settings DJANGO_BOOTSTRAP_UI_THEME = 'bootswatch-paper'
Bootstrap component templates
Render complete Bootstrap components by including our default implementations. Example:
Provide a list of strings ['alpha', 'beta', 'gamma'] as template variable items
Include listgroup.html parameterized with type='list' and items=items:
{% include 'bootstrap_ui/listgroup.html' with type='list' items=items only %}
Template tag API
Generate your own, customized Bootstrap elements using our template tags. Example:
Load bootstrap_ui_tags in your template:
{% load bootstrap_ui_tags %}
Use Bootstrap components through intuitive template tags:
{% listgroup %} {% listgroupitem %} Your raw text. {% endlistgroupitem %} {% listgroupitem %} You may also use a {{ context_variable }}. {% endlistgroupitem %} {% endlistgroup %}
Some Bootstrap components support different html tags, to change the default add a parameter:
{% listgroup use_tag="div" %} ... Your list group content goes here. ... {% endlistgroup %}
Continue reading in our detailed documentation at readthedocs.org.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size django_bootstrap_ui-0.3.0-py2.py3-none-any.whl (11.3 kB) | File type Wheel | Python version py2.py3 | Upload date | Hashes View |
Filename, size django-bootstrap-ui-0.3.0.tar.gz (7.7 kB) | File type Source | Python version None | Upload date | Hashes View |
Hashes for django_bootstrap_ui-0.3.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff216931a8934a5ddab15834e7c29316b886f4adcc60ec894f88154095069fa4 |
|
MD5 | edb04900b5ec779e85d305cf4d10c845 |
|
BLAKE2-256 | a57a03a37507e5c921ef8e4a43479191a28fcf86fd9c2f80ca4eb0b0f554894a |
Hashes for django-bootstrap-ui-0.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41201fbc817d33939a35951e03a5d20fb413e97571c541bdbbee17fc2aa6b812 |
|
MD5 | f9f79da13dccbe5bd8cc2a3177010fc0 |
|
BLAKE2-256 | 0f309d3a05ac245fc15ec23e7b67020352d3e5b56c295a70bd9191b25e0417dd |