--- a/add_result.py Sun Oct 12 10:55:22 2003 -0400
+++ b/add_result.py Sun Oct 12 11:11:31 2003 -0400
@@ -11,7 +11,8 @@
# import cgitb; cgitb.enable()
import cgi
-from htmltmpl import TemplateManager, TemplateProcessor
+from htmltmpl import TemplateManager
+from webutils import get_template_processor
import time
from utils import unique
import my_db
@@ -31,10 +32,9 @@
kw.append(id)
return kw
-def main(bk, kw):
+def main(bk, kw, prefs):
tmpl = TemplateManager().prepare("add_result.tmpl")
- tproc = TemplateProcessor()
- tproc.set("pagetitle", os.environ["REMOTE_USER"]+"'s XBELWeb Result")
+ tproc = get_template_processor(prefs)
tproc.set("url", bk.url)
tproc.set("name", bk.name)
tproc.set("added", bk.added)
@@ -62,4 +62,4 @@
id = bk.id
db.update_keywords(id, kw)
kw = map(lambda e: { 'keyword': e[1] }, db.get_keywords([id])[1:])
- main(bk, kw)
+ main(bk, kw, db.get_preferences())