Fbone (Flask bone) is a Flask (Python microframework) template/bootstrap/boilerplate application.
- A well designed structure for big project.
- Use jQuery, bootstrap and HTML5 Boilerplate.
- Implement tricky "Remember me" with Flask-Login.
- Handle forms with WTForms.
- Handle database with SQLAlchemy.
- Use Flask-Admin to build to admin interface.
- Deploy on Apache + mod_wsgi with fabric.
- i18n support with Flask-Babel.
- Unit testing with Flask-Testing.
Assume you are in Ubuntu and the project name is "myapp".
sudo git clone https://github.com/imwilsonxu/fbone.git /srv/www/myapp
sudo chmod -R o+w /srv/www/myapp
cd /srv/www/myapp
fab init:myapp
Open http://127.0.0.1
, done!
Init/reset database (with sqlite, check out fbone/config.py
).
python manage.py initdb
sudo chmod o+w /tmp/<project>.sqlite
Debug with local server.
fab run
Compile babel.
fab babel
sudo apt-get install -y tree
cd fbone
tree
Thanks to Flask, its extensions, and other goodies.