From 3c8ee8b6f81d892bffbc1a5f1e7af9a9adc9fd1d Mon Sep 17 00:00:00 2001 From: Date: Fri, 14 Sep 2007 17:05:38 -0400 Subject: [PATCH] fixed up the database and some other minor bugs --- ruler_gallery_db.sql | 4 +++- yourule.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ruler_gallery_db.sql b/ruler_gallery_db.sql index c151702..43079e6 100644 --- a/ruler_gallery_db.sql +++ b/ruler_gallery_db.sql @@ -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, - model VARCHAR(255) NOT NULL + model VARCHAR(255) NOT NULL, + show INTEGER NOT NULL DEFAULT 1 ); diff --git a/yourule.py b/yourule.py index 9010217..108cce3 100755 --- a/yourule.py +++ b/yourule.py @@ -132,7 +132,7 @@ class gallery: 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.' @@ -216,5 +216,5 @@ web.webapi.internalerror = web.debugerror if __name__ == "__main__": web.run(urls, globals(), web.reloader) -application = web.wsgifunc(web.webpyfunc(urls, globals())) +#application = web.wsgifunc(web.webpyfunc(urls, globals())) -- 2.39.5