An (almost) complete Flask application template with useful plugins.
Use this Flask boilerplate to initiate your project with some advance. The following plugins are installed, and some of them already in use:
- Flask-Login - Flask-Login provides user session management for Flask.
- Bootstrap-Flask - Ready-to-use Twitter-bootstrap for use in Flask.
- Flask-Uploads - Flask-Uploads allows your application to flexibly and efficiently handle file uploading and serving the uploaded files.
- Flask-Caching - Adds cache support to your Flask application.
- Flask-Compress - allows you to compress your Flask application's responses with gzip easily.
- Flask-Admin - Flask extension module that provides an admin interface
- Flask-Flatpages - Provides flat, static pages to a Flask application on text files as opposed to a relational database.
- Flask-Gravatar - Small extension for Flask to make using Gravatar easy.
- Flask-Mail - Makes sending mails from Flask applications straightforward and has support for unittesting.
- Flask-Restless - Flask-Restless provides a simple generation of ReSTful APIs for database models defined using Flask-SQLAlchemy.
- Flask-SQLAlchemy - Adds SQLAlchemy support to Flask. Quick and easy.
- Flask-PyMongo - Add PyMongo Support MongoDB.
- Flask-WTF - Simple integration of Flask and WTForms, including CSRF, file upload, and reCAPTCHA.
- Flask-Themes makes it easy for your application to support a wide range of appearances.
These packages are Ubuntu related: gcc
, make
, python3
(3.6+), python3-pip
, python3-venv
First, clone this repository.
$ git clone https://gitlab.com/ffb-portfolio/websites/flask-boilerplate.git
$ cd flask-boilerplate
Create a virtualenv, activate and install the requirements:
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install --upgrade pip
$ pip install -r requirements.txt
Or simply:
$ make venv
Then, run the application:
$ FLASK_APP=run.py python run.py
Or simply:
$ make run.py
To see your application, access this URL in your browser:
http://localhost:5000
All configuration options are in: config.py