Skip to content
/ fbone Public
forked from imwilsonxu/fbone

Fbone (Flask bone) is a Flask (Python microframework) template/bootstrap/boilerplate application.

License

Notifications You must be signed in to change notification settings

tmusy/fbone

 
 

Repository files navigation

INTRODUCTION

Fbone (Flask bone) is a Flask (Python microframework) template/bootstrap/boilerplate application, with best practices.

You can use it for

  • learning Flask.
  • kicking off your new project faster.

Flask bone homepage screenshot

FEATURES

Frontend Framework

Flask Extensions

Others

  • Well designed structure for large project.
  • Quickly Deploy via mod_wsgi and fabric.
  • Admin interface.
  • Home-bake logger.

USAGE

Pre-required:

  • Ubuntu (should be fine in other linux distro)
  • git
  • pip
  • fabric
  • sqlite
  • virtualenv
  • apache + mod_wsgi

Clone.

git clone https://github.com/imwilsonxu/fbone.git fbone

virtualenv.

fab setup

Debug.

fab d

Open http://127.0.0.1:5000, done!

Deploy with WSGI

Clone.

cd /var/www
git clone https://github.com/imwilsonxu/fbone.git fbone
sudo chown `whoami` -R fbone

vhost.

WSGIDaemonProcess fbone user=wilson group=wilson threads=5
WSGIScriptAlias /fbone /var/www/fbone/app.wsgi

<Directory /var/www/fbone/>
    WSGIScriptReloading On
    WSGIProcessGroup fbone
    WSGIApplicationGroup %{GLOBAL}
    Order deny,allow
    Allow from all
</Directory>

virtualenv.

fab setup

IMPORTANT:

  • Change INSTANCE_FOLDER_PATH in fbone/utils.py to suit yourself.
  • Put production.cfg under INSTANCE_FOLDER_PATH.

STRUCTURE

├── app.wsgi                (mod_wsgi wsgi config)
├── CHANGES
├── fabfile.py              (fabric file)
├── fbone                   (main app)
│   ├── api                 (api module)
│   ├── app.py              (create flask app)
│   ├── config.py           (config module)
│   ├── decorators.py
│   ├── extensions.py       (init flask extensions)
│   ├── frontend            (frontend module)
│   ├── __init__.py
│   ├── settings            (settings module)
│   ├── static
│   │   ├── css
│   │   ├── favicon.png
│   │   ├── humans.txt
│   │   ├── img
│   │   ├── js
│   │   └── robots.txt
│   ├── templates
│   │   ├── errors
│   │   ├── frontend
│   │   ├── index.html
│   │   ├── layouts 
│   │   ├── macros
│   │   ├── settings
│   │   └── user
│   ├── translations        (i18n)
│   ├── user                (user module)
│   │   ├── constants.py
│   │   ├── forms.py        (wtforms)
│   │   ├── __init__.py
│   │   ├── models.py
│   │   ├── views.py
│   ├── utils.py
├── LICENSE
├── manage.py               (manage via flask-script)
├── MANIFEST.in
├── README.markdown
├── screenshots
├── setup.py
└── tests                   (unit tests, run via `nosetest`)

LICENSE

MIT LICENSE

ACKNOWLEDGEMENTS

Thanks to Python, Flask, its extensions, and other goodies.

Bitdeli Badge

About

Fbone (Flask bone) is a Flask (Python microframework) template/bootstrap/boilerplate application.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published