fixed up the database and some other minor bugs
author<mako@atdot.cc> <>
Fri, 14 Sep 2007 21:05:38 +0000 (17:05 -0400)
committer<mako@atdot.cc> <>
Fri, 14 Sep 2007 21:05:38 +0000 (17:05 -0400)
ruler_gallery_db.sql
yourule.py

index c151702492e9da479f3cbdfcae6f35ab1a889a56..43079e67d2ccd43de6d8f1ddf8aeeb949c0ed35b 100644 (file)
@@ -1,9 +1,11 @@
+DROP TABLE IF EXISTS gallery;
 CREATE TABLE gallery (
   id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
   pixel_width REAL NOT NULL,
   unit_width REAL NOT NULL,
   units VARCHAR(100) NOT NULL,
 CREATE TABLE gallery (
   id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
   pixel_width REAL NOT NULL,
   unit_width REAL NOT NULL,
   units VARCHAR(100) NOT NULL,
-  model VARCHAR(255) NOT NULL
+  model VARCHAR(255) NOT NULL,
+  show INTEGER NOT NULL DEFAULT 1
 );
 
 
 );
 
 
index 90102172ec531ff76aa1f97427b76f2e1f3c7434..108cce3e3cea30ac45ce1f57df60c0b0eee1f0fa 100755 (executable)
@@ -132,7 +132,7 @@ class gallery:
     def POST(self, ruler_url):
         input = web.input()
 
     def POST(self, ruler_url):
         input = web.input()
 
-        errormsg = valid_input(input)
+        errormsg = validate_input(input)
         if not input.model:
             errormsg = 'Please fill out all fields.'
 
         if not input.model:
             errormsg = 'Please fill out all fields.'
 
@@ -216,5 +216,5 @@ web.webapi.internalerror = web.debugerror
 if __name__ == "__main__":
     web.run(urls, globals(), web.reloader)
 
 if __name__ == "__main__":
     web.run(urls, globals(), web.reloader)
 
-application = web.wsgifunc(web.webpyfunc(urls, globals()))
+#application = web.wsgifunc(web.webpyfunc(urls, globals()))
 
 

Benjamin Mako Hill || Want to submit a patch?