A Flask template for cookiecutter.
$ pip install cookiecutter
$ cookiecutter https://github.com/sloria/cookiecutter-flask.git
You will be asked about your basic info (name, project name, app name, etc.). This info will be used in your new project.
- Bootstrap 3 and Font Awesome 4 with starter templates
- Flask-SQLAlchemy with basic User model
- Easy database migrations with Flask-Migrate
- Flask-WTForms with login and registration forms
- Flask-Login for authentication
- Flask-Bcrypt for password hashing
- Procfile for deploying to a PaaS (e.g. Heroku)
- Flask-Testing, Flask-Webtest, nose, and Factory-Boy for testing (example tests included)
- A simple
manage.py
script. - CSS and JS minification using Flask-Assets
- Optional bower support for frontend package management
- Caching using Flask-Cache
- Useful debug toolbar
- Utilizes best practices: Blueprints and Application Factory patterns
- Building Websites in Python with Flask
- Getting Bigger with Flask
- Structuring Flask Apps
- Flask-Foundation by @JackStouffer
- flask-bones by @cburmeister
- flask-basic-registration by @mjhea0
- Flask Official Documentation
BSD licensed.
- Fix static assets.
- Update default year in cookiecutter.json. Thanks @Omeryl
- Correct testing of redirects in webtests. Thanks @Widdershin
- Fix POST action in nav form. Thanks @Widdershin.
- Update Bootstrap (3.1.1) and jQuery (2.1.0)
- Optional support for bower.
- Minified assets aren't used in dev environment.
- More modular organization: each blueprint contains its own view, models, and forms in a directory. There is still a single directory for templates and static assets.
- Use Flask-Bcrypt for password hashing.
- Flask-Login for authentication.
- Simple test setup. Just create a subclass of
DbTestCase
. - Flask-Testing support.
- Use Factory-Boy for test factories.
- Use WebTest for functional testing.
- Add Flask-Debugtoolbar.
- Migrations using Flask-Migrate.
- Caching using Flask-Cache.
- Add error page templates (404, 401, 500)
- Add Font Awesome 4.0.3 for icons.
- Add manage.py script
- Add Flask-Assets for CSS and JS bundling+minification
- Use different configs for development and production environments, controlled by the MYFLASKAPP_ENV system environment variable
- Use Blueprints and application factory pattern. The
simple
branch does not use these.
- First iteration
- Bootstrap 3 final
- Working User model and registration