Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion README.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ To run the application install the <<X1,prerequisite packages>> then:

git clone https://github.com/srackham/bottle-mongodb-example.git
cd bottle-mongodb-example
python bottle-mongodb-example.py
python main.py

The application creates and displays a paged list of user
created messages which are stored in a MongoDB database along with
Expand All @@ -74,6 +74,14 @@ the database, tables or schema -- it all happens automatically.

sudo easy_install pymongo

- mongoengine, the Python Object-Document-Mapper for working with MongoDB

pip install mongoengine

- mako, the Python template library

pip install mako

- The Bottle web-framework:

git clone https://github.com/defnull/bottle.git
Expand Down
5 changes: 4 additions & 1 deletion controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
from bottle import request, response, get, post
from bottle import static_file, redirect, HTTPResponse
from bottle import mako_view as view
from PIL import Image
try:
from PIL import Image
except ImportError:
import Image
from pymongo.objectid import ObjectId
from models import Message

Expand Down