Skip to main content

Include Bootstrap4 in your Flask project

Project description

Flask-BS4

This is a fork of Flask-Bootsrap upgraded to Bootstrap 4.x.x.

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 and works with no boilerplate code in your application.

Usage

Here is an example:

from flask_bs4 import Bootstrap

[...]

Bootstrap(app)

This makes some new templates available, containing blank pages that include all bootstrap resources, and have predefined blocks where you can put your content.

As of version 3, Flask-Bootstrap has a proper documentation, which you can check for more details.

Sample App

Welcome to the Flask-BS4 sample app. This will give you an overview of how the Flask-BS4 package can render different types of input fields.

First you should create a virtual environment. I prefer using:

$ python3 -m venv venv

To run this application yourself, please install its requirements first:

$ pip install -r sample_app/requirements.txt

Then, you can actually run the application. Optionally you can set FLASK_ENV=development.

$ export FLASK_APP=sample_app
$ flask run

Afterwards, point your browser to localhost:5000, then check out the source.

Project details


Download files

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

Source Distribution

Flask-BS4-4.4.1.7.tar.gz (980.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Flask_BS4-4.4.1.7-py3-none-any.whl (1.0 MB view details)

Uploaded Python 3

File details

Details for the file Flask-BS4-4.4.1.7.tar.gz.

File metadata

  • Download URL: Flask-BS4-4.4.1.7.tar.gz
  • Upload date:
  • Size: 980.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for Flask-BS4-4.4.1.7.tar.gz
Algorithm Hash digest
SHA256 1327b8cd7e707230f2727b9ae8caf285a333d059b9893749f6990b9612c08b2e
MD5 5d4f7eb863f4d0389d9a5f0955d3f034
BLAKE2b-256 4ba98a896e18e1e0f5918b87b40acb8f0eee768d2e63f88fa19f83f9070b6aa6

See more details on using hashes here.

File details

Details for the file Flask_BS4-4.4.1.7-py3-none-any.whl.

File metadata

  • Download URL: Flask_BS4-4.4.1.7-py3-none-any.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for Flask_BS4-4.4.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 7dfa4d872262f2a80bef5592f5fc05a5244dcd8038def3dee64d7eb8a2a0c080
MD5 36443c7656c9ec0437820d4cf1ffc3db
BLAKE2b-256 dafcabc9c9f7bccbbf97d6ff0dab74ac90c48d1638f27c702a13e31db1e8cee8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page