Skip to content

Flask Scaffolding featuring Python 3.4, SQLALCHEMY, BackboneJS, RequireJS & Sass (Bootstrap 3)

Notifications You must be signed in to change notification settings

lassegit/flask-scaffolding

Repository files navigation

Flask Scaffolding with Python 3.4, BackboneJS/requireJS, Bootstrap and Sass (libsass)

It contains OAuth logic for Google and Facebook, just fill in the missing keys in app/controllers/authorize.py. And also regular form login in app/controllers/auth.

Install

Clone the repository git clone https://github.com/lassecph/flask-scaffolding.git your_project_name and rm -r .git folder. Fill out the needed settings in app/settings.py.

bower install

npm install

virtualenv -p /usr/local/bin/python3 venv (path to your python 3 installation)

. venv/bin/activate

make deps

./manage.py createdb

./manage.py server (or run uwsgi --ini uwsgi.ini --py-autoreload 1)

grunt watch

grunt build creates a app/dist folder with all the assets (js, css, templates, fonts) for deployment.

Run

make dev or make prod (check commands in Makefile)

You can also run it via ./manage.py runserver if you don't want to use uwsgi.

Develop

The following command auto generates various Backbone MVC:

yo backbone:model blog
yo backbone:collection blog
yo backbone:router blog
yo backbone:view blog

This is taken from Yeoman.io's BackboneJS project.

Deploy

Run grunt build.

More

Set up uwsgi for production: https://github.com/mking/flask-uwsgi

Credits

Build on top of https://github.com/JackStouffer/Flask-Foundation

With the BackboneJS frontend from https://github.com/yeoman/generator-backbone

Readmore

Flask documentation: http://flask.pocoo.org/docs/0.10/

Flask SQLAlchemy documentation: https://pythonhosted.org/Flask-SQLAlchemy/index.html

Flask Cache documentation: https://pythonhosted.org/Flask-Cache/

Flask Oauthlib documentation: https://flask-oauthlib.readthedocs.org/en/latest/

About

Flask Scaffolding featuring Python 3.4, SQLALCHEMY, BackboneJS, RequireJS & Sass (Bootstrap 3)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published