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, TemplateProcessor |
14 from htmltmpl import TemplateManager |
|
15 from webutils import get_template_processor; |
15 import my_db |
16 import my_db |
16 import time |
17 import time |
17 from bkmark import Bookmark |
18 from bkmark import Bookmark |
18 import os |
19 import os |
19 |
20 |
20 def main(keywords, title, url): |
21 def main(keywords, title, url, prefs): |
21 tmpl = TemplateManager().prepare("add_bk.tmpl") |
22 tmpl = TemplateManager().prepare("add_bk.tmpl") |
22 tproc = TemplateProcessor() |
23 tproc = get_template_processor(prefs) |
23 tproc.set("pagetitle", os.environ["REMOTE_USER"]+"'s XBELWeb Edit Bookmark") |
|
24 tproc.set('ctitle', title) |
24 tproc.set('ctitle', title) |
25 tproc.set('curl', url) |
25 tproc.set('curl', url) |
26 tproc.set('desc', '') |
26 tproc.set('desc', '') |
27 tproc.set('bkid', -1) |
27 tproc.set('bkid', -1) |
28 tproc.set('Keywords', keywords) |
28 tproc.set('Keywords', keywords) |