prefs.py
changeset 60 dad9733c99f0
parent 59 2c5e38748004
child 61 a1bcf5e4b8a4
--- a/prefs.py	Sun Dec 28 12:29:23 2008 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-#!/usr/bin/python
-
-import sys
-import traceback
-sys.path.insert(0, "/home/fabien/lib/python")
-sys.path.insert(0, "./lib")
-sys.stderr = sys.stdout
-
-print "Content-type: text/html; charset=iso-8859-1;"
-print
-
-# import cgitb; cgitb.enable()
-import cgi
-from templates import Template
-import my_db
-import os
-
-def main(prefs):
-    tmpl = Template("prefs.tmpl", prefs)
-    sortfields = []
-    for field in ['keyword', 'count']:
-      sortfields.append({'field': field,
-                     'selected' : prefs['keywords_sort'] == field })
-    tmpl.set('Sortfields', sortfields)
-    views = []
-    for view in [(0, 'dynamic'), (1, 'folder')]:
-    	views.append({ 'view': view[0],
-	        'name': view[1],
-		'selected': prefs['default_view'] == view[0]} )
-    tmpl.set('Views', views)
-    print tmpl.process()
-
-if (__name__ == "__main__"):
-    db = my_db.connect(os.environ["REMOTE_USER"])
-    main(db.get_preferences())