+from jinja import Environment, FileSystemLoader
+jinja_env = Environment('<%', '%>', '<%=', '%>', '<%#', '%>',
+ loader=FileSystemLoader('templates/'))
+
+def render(filename, vars):
+ web.header("Content-Type","text/html; charset=utf-8")
+ tmpl = jinja_env.get_template(filename + '.tmpl')
+ print tmpl.render(vars)
+ web.debug(web.ctx)
+