]> projects.mako.cc - yourule/commitdiff
committed a few changes for moving to production
author<mako@atdot.cc> <>
Sun, 16 Sep 2007 20:54:16 +0000 (16:54 -0400)
committer<mako@atdot.cc> <>
Sun, 16 Sep 2007 20:54:16 +0000 (16:54 -0400)
yourule.py

index 108cce3e3cea30ac45ce1f57df60c0b0eee1f0fa..c5ffdb7eeed914f187daf138d4cb31eee49c6dc4 100755 (executable)
@@ -7,14 +7,16 @@ from storm.locals import *
 from svgruler import SVGRuler
 
 # the url map for the application
 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')
 
          '/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):
 store = Store(database)
 
 class Ruler(object):

Benjamin Mako Hill || Want to submit a patch?