From: Date: Sun, 16 Sep 2007 20:54:16 +0000 (-0400) Subject: committed a few changes for moving to production X-Git-Url: https://projects.mako.cc/source/yourule/commitdiff_plain/2b6309dc7c65b8849fcd9aa7aae834b014ab5a10?ds=sidebyside committed a few changes for moving to production --- diff --git a/yourule.py b/yourule.py index 108cce3..c5ffdb7 100755 --- a/yourule.py +++ b/yourule.py @@ -7,14 +7,16 @@ from storm.locals import * from svgruler import SVGRuler # the url map for the application -urls = ( '/', 'index', +urls = ( '/?', 'index', '/ruler_([0-9\.]+)px_([0-9\.]+)([A-Za-z]+).(svg|png|jpg)', 'ruler_img', '/show/(.*(svg|png|jpg))', 'show_ruler', '/gallery(.*)', 'gallery', '/delete/(\d+)', 'delete', '/undelete/(\d+)', 'undelete') -database = create_database("sqlite:yourule.db") +database = create_database("sqlite:%s/db/yourule.db" % + os.path.dirname(__file__)) + store = Store(database) class Ruler(object):