# HG changeset patch # User Fabien Ninoles # Date 1230495580 18000 # Node ID 8f246bc7059d02ab13cc5499fa83cdee6df4f202 # Parent 56193b37f6663160041ae1c1a9f425e5299fc4f0 Move template_dir inside config. diff -r 56193b37f666 -r 8f246bc7059d lib/config.py --- a/lib/config.py Sun Dec 28 13:45:59 2008 -0500 +++ b/lib/config.py Sun Dec 28 15:19:40 2008 -0500 @@ -5,3 +5,4 @@ passwd = 'crow' database = 'bookmarker3' port = 10021 +template_dir = 'templates' diff -r 56193b37f666 -r 8f246bc7059d lib/templates.py --- a/lib/templates.py Sun Dec 28 13:45:59 2008 -0500 +++ b/lib/templates.py Sun Dec 28 15:19:40 2008 -0500 @@ -1,8 +1,8 @@ from htmltmpl import TemplateManager, TemplateProcessor from urlparse import urljoin from os import environ, path +from config import template_dir -TEMPLATE_DIR = "templates" def get_curl(): url = "http" if environ["HTTPS"] == 'on': @@ -15,7 +15,7 @@ class Template: def __init__(self, template, prefs, status = "msg", status_msg = ""): self.tproc = TemplateProcessor() - self.tmpl = TemplateManager().prepare(path.join(TEMPLATE_DIR, 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'])