Skip to content

danieltimpone/lurcat-flask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

INTRODUCTION

lurcat (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/lurcat.git lurcat

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/lurcat.git lurcat
sudo chown `whoami` -R lurcat

vhost.

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

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

virtualenv.

fab setup

IMPORTANT:

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

STRUCTURE

├── app.wsgi                (mod_wsgi wsgi config)
├── CHANGES
├── fabfile.py              (fabric file)
├── lurcat                   (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

flask boilerplate for the lurcat framework service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published