diff options
Diffstat (limited to 'module/web/utils.py')
-rw-r--r-- | module/web/utils.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/module/web/utils.py b/module/web/utils.py index 88cc75542..1a15a8a00 100644 --- a/module/web/utils.py +++ b/module/web/utils.py @@ -19,12 +19,15 @@ import re from bottle import request, HTTPError, redirect, ServerAdapter -from webinterface import env, TEMPLATE, PYLOAD - +from webinterface import env, TEMPLATE, TEMPLATE_MOBILE, PYLOAD +# TODO: useful but needs a rewrite, too def render_to_response(name, args={}, proc=[]): for p in proc: args.update(p()) - t = env.get_or_select_template((TEMPLATE + "/" + name, "default/" + name)) + if is_mobile(): + t = env.get_or_select_template((TEMPLATE_MOBILE + "/" + name,"default_mobile/" + name)) + else: + t = env.get_or_select_template((TEMPLATE + "/" + name, "default/" + name)) return t.render(**args) |