summaryrefslogtreecommitdiff
path: root/renderer.py
diff options
context:
space:
mode:
Diffstat (limited to 'renderer.py')
-rw-r--r--renderer.py17
1 files changed, 7 insertions, 10 deletions
diff --git a/renderer.py b/renderer.py
index b8ce716..6f983a4 100644
--- a/renderer.py
+++ b/renderer.py
@@ -17,24 +17,21 @@ class Renderer:
output_encoding='utf-8',
format_exceptions = True)
- def render (self, tpl, level = "pages" , **kwargs):
+ def render (self, tpl, **kwargs):
try:
- t = self.get_tpl(tpl, level)
+ t = self.get_tpl(tpl)
except mako.exceptions.TopLevelLookupException, e:
raise web.ctx.app_stack[-1].notfound(tpl)
- return t.render(h = helper, url = helper.url, w = web, _hl = highlighting, **kwargs)
+ return t.render(h = helper, url = helper.url, w = web, **kwargs)
__call__ = render
- def get_tpl (self, tpl, level):
- return self.lookup.get_template(self.get_tpl_name(tpl, level))
-
- def get_tpl_name (self, tpl, level):
+ def get_tpl (self, tpl):
if not tpl.endswith(".mako"):
tpl = tpl+".mako"
-
- return os.path.join(level, tpl)
-
+
+ return self.lookup.get_template(tpl)
+
# the one and only instance :)
render = Renderer()