summaryrefslogtreecommitdiffstats
path: root/ipsilon
diff options
context:
space:
mode:
authorPatrick Uiterwijk <puiterwijk@redhat.com>2014-10-10 20:21:25 +0200
committerPatrick Uiterwijk <puiterwijk@redhat.com>2014-10-24 18:03:28 +0200
commite94243aa74e7a77fb6457e02f6f4201b3f063b96 (patch)
treeb6566bf59769bc0d1e3944fa64bf46b68e33f3d6 /ipsilon
parent5ea128eca075c19880419c072be36fd761aad4a4 (diff)
downloadipsilon-e94243aa74e7a77fb6457e02f6f4201b3f063b96.tar.gz
ipsilon-e94243aa74e7a77fb6457e02f6f4201b3f063b96.tar.xz
ipsilon-e94243aa74e7a77fb6457e02f6f4201b3f063b96.zip
Make the template directory configurable
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'ipsilon')
-rwxr-xr-xipsilon/ipsilon6
1 files changed, 5 insertions, 1 deletions
diff --git a/ipsilon/ipsilon b/ipsilon/ipsilon
index 9700106..681600d 100755
--- a/ipsilon/ipsilon
+++ b/ipsilon/ipsilon
@@ -60,7 +60,11 @@ admin_config = datastore.load_config()
for option in admin_config:
cherrypy.config[option] = admin_config[option]
-templates = os.path.join(cherrypy.config['base.dir'], 'templates')
+template_dir = cherrypy.config.get('template_dir', 'templates')
+if template_dir.startswith('/'):
+ templates = template_dir
+else:
+ templates = os.path.join(cherrypy.config['base.dir'], template_dir)
template_env = Environment(loader=FileSystemLoader(templates))
if __name__ == "__main__":