Skip to content

A minimal skeleton for doing Bottle apps in a structured fashion (targeting Python 2.7 or above)

License

Notifications You must be signed in to change notification settings

antoniolopes/bootstrap-bottle

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A minimal skeleton for doing Bottle apps in a structured fashion (targeting Python 2.7 or above)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.8%
  • CSS 0.2%