From: Date: Fri, 14 Sep 2007 21:05:38 +0000 (-0400) Subject: fixed up the database and some other minor bugs X-Git-Url: https://projects.mako.cc/source/yourule/commitdiff_plain/3c8ee8b6f81d892bffbc1a5f1e7af9a9adc9fd1d?hp=--cc fixed up the database and some other minor bugs --- 3c8ee8b6f81d892bffbc1a5f1e7af9a9adc9fd1d 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()))