diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-08-26 23:30:22 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-08-26 23:30:22 +0200 |
commit | 1edbca46b0aef5d6bc9ca2d8c28dd32a7e7e9cf5 (patch) | |
tree | 20be87efcda4501b17fca9056628aa92985445d7 /module/web/utils.py | |
parent | Version number: 0.4.10 (diff) | |
download | pyload-1edbca46b0aef5d6bc9ca2d8c28dd32a7e7e9cf5.tar.xz |
Diffstat (limited to 'module/web/utils.py')
-rw-r--r-- | module/web/utils.py | 9 |
1 files changed, 4 insertions, 5 deletions
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): |