lib/templates.py
changeset 59 2c5e38748004
parent 58 004a32370ba5
child 63 8f246bc7059d
--- a/lib/templates.py	Sun Dec 28 12:24:02 2008 -0500
+++ b/lib/templates.py	Sun Dec 28 12:29:23 2008 -0500
@@ -1,7 +1,8 @@
 from htmltmpl import TemplateManager, TemplateProcessor
 from urlparse import urljoin
-from os import environ
+from os import environ, path
 
+TEMPLATE_DIR = "templates"
 def get_curl():
 	url = "http"
 	if environ["HTTPS"] == 'on':
@@ -14,7 +15,7 @@
 class Template:
 	def __init__(self, template, prefs, status = "msg", status_msg = ""):
 		self.tproc = TemplateProcessor()
-		self.tmpl = TemplateManager().prepare(template)
+		self.tmpl = TemplateManager().prepare(path.join(TEMPLATE_DIR, template))
     		self.set("remote_user", prefs["fullname"])
     		self.set("kw_size", prefs['keywords_box'])
     		self.set("kw_sort", prefs['keywords_sort'])