Fbone (Flask bone) is a Flask (Python microframework) template/bootstrap/boilerplate application.
You can use it for
- learning Flask.
- quicker developing your new project.
- Well designed for large project.
- Support HTML5 with HTML5 Boilerplate.
- Integrate with jQuery and bootstrap.
- Implement user session management (signin/signout/rememberme) with Flask-Login.
- Implement reset password via email with Flask-Mail.
- Implement admin interface with Flask-Admin.
- Implement unit testing with Flask-Testing.
- Implement external script (initdb/testing/etc) with Flask-Script.
- Implement Logger.
- Handle i18n with Flask-Babel.
- Handle web forms with WTForms.
- Handle orm with SQLAlchemy.
- Handle deployment with mod_wsgi and fabric.
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!
Debug in local machine.
fab debug
Open http://127.0.0.1:5000
, 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.