Skip to content

delciotorres/fbone

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

46 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors