From b53310335756154d2a73a4da36bc1e2ed8047750 Mon Sep 17 00:00:00 2001 From: Robert Hanacek Date: Sat, 24 Dec 2011 13:17:36 -0600 Subject: [PATCH 1/2] Resolved pil installation issue by detecting by testing import in either way it can be installed. Updated list of prerequisits. --- README.asciidoc | 8 ++++++++ controllers.py | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.asciidoc b/README.asciidoc index 17a68e7..88b774a 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -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 diff --git a/controllers.py b/controllers.py index 47f8507..5478a04 100644 --- a/controllers.py +++ b/controllers.py @@ -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 From 6ef463d70b812fc36b908d27ea78cb961347582b Mon Sep 17 00:00:00 2001 From: Robert Hanacek Date: Sat, 24 Dec 2011 13:24:03 -0600 Subject: [PATCH 2/2] Corrected main app filename in run instructions --- README.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.asciidoc b/README.asciidoc index 88b774a..ed4104a 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -55,7 +55,7 @@ To run the application install the <> 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