Flask-Bootstrap¶
Flask-Bootstrap packages Bootstrap into an extension that mostly consists of a blueprint named ‘bootstrap’. It can also create links to serve Bootstrap from a CDN.
- Basic usage
- Configuration
- Macros
- WTForms support
- Flask-SQLAlchemy support
- Flask-Nav support
- CDN support
- FAQ
- Why do I have undesired auto-escapes in my template output?
- How can I add custom javascript to the template?
- Why is Bootstrap javascript not loading?
- How do I add custom stuff to the header?
- How do I add a footer?
- How do I serve the static files in deployment?
- How do I use Bootstrap 2/3?
- Where is FontAwesome?
- Why are you shipping jQuery 1 instead of jQuery 2?
- How can I use jQuery2 instead of jQuery1?
- Using Bootstrap 2
- Flask-Bootstrap Changelog
- 中文文档
Installation¶
Flask-Bootstrap can be installed using pip
from PyPI. Using virtualenv is recommended – for no specific reason other than it being good practice. Installing is simple:
pip install flask-bootstrap
For development, clone the official github repository instead and use:
python setup.py develop
Getting started¶
To get started, go ahead by reading Basic usage. A list of FAQ is also available.
The latest major version of Bootstrap as of this writing is Bootstrap 3. A branch of Flask-Bootstrap supporting version 2 is still supported, see the page on Using Bootstrap 2 for details.
A note on versioning¶
Flask-Bootstrap tries to keep some track of Bootstrap releases. Versioning is
usually in the form of Bootstrap version
.``Flask-Bootstrap iteration``.
For example, a version of 2.0.3.2
bundles Bootstrap version 2.0.3
and is
the second release of Flask-Bootstrap containing that version.
If you need to rely on your templates not changing, simply pin the version in your setup.py.