Skip to content

Latest commit

 

History

History
49 lines (38 loc) · 1.63 KB

README.md

File metadata and controls

49 lines (38 loc) · 1.63 KB

bootstrap-bottle

A minimal skeleton for doing Bottle apps in a structured fashion (targeting Python 2.7 or above), meant as reference code for training sessions.

Should be usable out of the box (even if it only displays one view).

This is a fork from @rcarmo's ink-bottle replacing Ink with Bootstrap.

Filesystem Layout

+-- app.py                # entry point
+-- etc
|    +-- default.json     # main configuration file
+-- api
|    +-- [model].py       # RESTful routes for each model
+-- routes 
|    +-- [kind].py        # all other routes (static, actions, etc.)
+-- controllers
|    +-- [behavior].py    # controllers used by routes
+-- lib
|    +-- bottle.py        # more bang than Flask
|    +-- peewee.py        # almost as nice as the Django ORM
|    +-- config.py        # loads up the JSON file 
|    +-- utils            # my little bag of tricks
|    |    +-- core.py
|    |    +-- urlkit.py
|    |    +-- stringkit.py
|    |    +-- datekit.py
|    +-- [dependencies]   # Include ALL the dependencies locally
+-- models
|    +-- db.py            # Base models and database setup
|    +-- [store].py       # Other data stores (Redis, etc.)
+-- static                # Static assets (HTML and sundry)
+-- views
     +-- layout.tpl       # Base layout for templates
     +-- [group]          # Partials for each entity/screen

Running

make serve

Note

Don't forget to do git submodule update --init when checking out the source.