equal
deleted
inserted
replaced
9 print "Content-type: text/html; charset=iso-8859-1;" |
9 print "Content-type: text/html; charset=iso-8859-1;" |
10 print |
10 print |
11 |
11 |
12 # import cgitb; cgitb.enable() |
12 # import cgitb; cgitb.enable() |
13 import cgi |
13 import cgi |
14 from htmltmpl import TemplateManager |
14 from templates import Template |
15 from webutils import get_template_processor |
|
16 import my_db |
15 import my_db |
17 import time |
16 import time |
18 import os |
17 import os |
19 |
18 |
20 def main(keywords, prefs): |
19 def main(keywords, prefs): |
21 tmpl = TemplateManager().prepare("edit_kw.tmpl") |
20 tmpl = Template("edit_kw.tmpl", prefs) |
22 tproc = get_template_processor(prefs) |
21 tmpl.set('Keywords', keywords) |
23 tproc.set('Keywords', keywords) |
22 print tmpl.process() |
24 print tproc.process(tmpl) |
|
25 |
23 |
26 if (__name__ == "__main__"): |
24 if (__name__ == "__main__"): |
27 form = cgi.FieldStorage() |
25 form = cgi.FieldStorage() |
28 db = my_db.connect(os.environ["REMOTE_USER"]) |
26 db = my_db.connect(os.environ["REMOTE_USER"]) |
29 kw = db.get_all_keywords()[1:] |
27 kw = db.get_all_keywords()[1:] |