Skip to content

A flask template with Bootstrap 3, asset bundling+minification, starter templates, and registration/authentication. For use with cookiecutter.

Notifications You must be signed in to change notification settings

wdm0006/cookiecutter-flask

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cookiecutter-flask (plus some stuff)

A(nother) Flask template for cookiecutter.

cookiecutter

Modified from the version authored by Github user: sloria

Goals

The primary goal is to have a different logical split of files (models, views and services instead of public, user, etc), which is purely personal preference.

Secondary is a slight expansion in scope to include other common pages and functionality, which is in progress. So far we have completed:

  • Forgotten password handling
  • Username change
  • Password change
  • Unsubscribe
  • Google Analytics Integration
  • Heroku Integration

In progress are:

  • Simple text and external image blog powered by markdown

For the future are:

  • Sample contact form and page
  • Basic Admin UI
  • Example T&Cs
  • Social Links/Integration
  • Login outside of the header (maybe modal)
  • Commenting on blog via discus or similar
  • Etc.

A live example can be found here: CookieCutter Flask Demo

Contributing

If you are interested in contributing please let me know, any of the future goals listed above would be great to help with.

Use it now

$ pip install cookiecutter
$ cookiecutter https://github.com/wdm0006/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.

Full example for pushing app to Heroku here <http://willmcginnis.com/2015/09/28/cookiecutter-flask-and-some-other-stuff/>_

screenshot

Features

  • Bootstrap 3 and Font Awesome 4 with starter templates
  • 3 Bootstrap themes included (standard, dark, and paper)
  • Flask-SQLAlchemy with basic User model
  • Easy database migrations with Flask-Migrate
  • Flask-WTForms with login and registration forms
  • Flask-Mail for forgotten password emails
  • Username/Password reset and unsubscribe functionality baked in
  • Flask-Login for authentication
  • Flask-Bcrypt for password hashing
  • Out-of-the-box ready for deploying to a PaaS (e.g. Heroku)
  • pytest and Factory-Boy for testing (example tests included)
  • A simple manage.py script.
  • CSS and JS minification using Flask-Assets
  • Caching using Flask-Cache
  • Useful debug toolbar
  • sitemap.xml and robots.txt built in
  • Utilizes best practices: Blueprints and Application Factory patterns

Inspiration

License

BSD licensed.

About

A flask template with Bootstrap 3, asset bundling+minification, starter templates, and registration/authentication. For use with cookiecutter.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 80.6%
  • Python 10.1%
  • HTML 9.0%
  • CSS 0.3%