From 1edbca46b0aef5d6bc9ca2d8c28dd32a7e7e9cf5 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 26 Aug 2014 23:30:22 +0200 Subject: Re-apply 8446e16346ece5a934550f69e81d0cad528f7fba --- module/web/utils.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'module/web/utils.py') diff --git a/module/web/utils.py b/module/web/utils.py index cb95b1cf5..7afa5f203 100644 --- a/module/web/utils.py +++ b/module/web/utils.py @@ -17,16 +17,15 @@ """ from bottle import request, HTTPError, redirect, ServerAdapter -from webinterface import env, TEMPLATE +from webinterface import env, THEME from module.Api import has_permission, PERMS, ROLE -def render_to_response(name, args={}, proc=[]): +def render_to_response(file, args={}, proc=[]): for p in proc: args.update(p()) - - t = env.get_template(TEMPLATE + "/" + name) - return t.render(**args) + path = "%s/tml/%s" % (THEME, file) + return env.get_template(path).render(**args) def parse_permissions(session): -- cgit v1.2.3