The Best Flask Boilerplate Framework
Project description
GlassBlower v2 The Best Flask Boilerplate!! GlassBlower is an implementation based on the Rails style
Fist steps:
In the directory where you want to do the project $python glassblower.py
$cd project
#in your current directory, to generate the virtual envairoment $ virtualenv venv
$ source venv/bin/activate
#this file contain Flask-libs $ pip install -r requirements.txt
#(optional)start database $ python manage.py db init
#(require 4) first migrate $ python manage.py db migrate
#(require 5) update database $ python manage.py db upgrade
#for run the server, is like django manage.py $ python manage.py runserver
Config database and enviroment work: config/config.py
Add the routes in: config/routes.py
GlassBlower File creator: You can create views, models, api, login and scaffolding
Create view example:
$ python glassblower.py blow view –newFile whatever
- this command make:
app/views/whatever.py app/templates/whatever.html
- and modify:
app/views/__init__.py
you need to update route.py for routing
Create model example:
$ python glassblower.py blow model –newFile whatever
this command make: app/models/whatever.py
and modify: app/models/__init__.py
you need to do
$ python manage.py db migrate $ python manage.py db upgrade
Create login example:
In GlassBlower is very simple make a login
$ python glassblower.py blow login
You need to do after:
$ python manage.py db migrate $ python manage.py db upgrade
Create api example:
This command make rest api
$ python glassblower.py blow api –newFile whatever
You need to do after modify models file:
$ python manage.py db migrate $ python manage.py db upgrade
Create scaffold example:
$ python glassblower.py blow scaffold –newFile whatever
You need to do after modify models file:
$ python manage.py db migrate $ python manage.py db upgrade
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.