From 498fbab03ad2a940fdebbb8d3c9e9496f0b0148c Mon Sep 17 00:00:00 2001 From: Martijn Voncken Date: Tue, 22 Jul 2008 18:24:42 +0000 Subject: [PATCH] improve /template/render/ --- deluge/ui/webui/pages.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/deluge/ui/webui/pages.py b/deluge/ui/webui/pages.py index 2325d7b19..906b71f2c 100644 --- a/deluge/ui/webui/pages.py +++ b/deluge/ui/webui/pages.py @@ -390,15 +390,14 @@ class template_static(static_handler): 'templates/%s/static' % config.get('template')) route("/template/static/(.*)", template_static) -class render_static: - "render anything in template_dir" +class template_render: + "render anything in /render/ dir" @deco.deluge_page def GET(self, name): filename = os.path.join(os.path.dirname(__file__), - 'templates/%s/static/%s' % (config.get('template'), name)) - log.debug("render-static:%s" % filename) + 'templates/%s/render/%s' % (config.get('template'), name)) return web.template.Template(open(filename).read(), filename=filename)() -route("/template/render/(.*)", render_static) +route("/template/render/(.*)", template_render) class template_style: def GET(self):