Permalink
Browse files

Attribute filename for jinja and kajiki.

  • Loading branch information...
ralphbean committed May 26, 2012
1 parent 2fb6cf8 commit d130c3c9f17e13984bc9d28d3601dcfdfa5f6ca6
Showing with 3 additions and 2 deletions.
  1. +1 −1 setup.py
  2. +2 −1 tw2/core/templating.py
@@ -51,7 +51,7 @@ def get_description(fname='README.rst'):
setup(
name='tw2.core',
version='2.1.0a1',
version='2.1.0a2',
description="Web widget creation toolkit based on TurboGears widgets",
long_description = get_description(),
install_requires=requires,
@@ -138,10 +138,11 @@ def get_render_callable(engine_name, displays_on, src, filename=None):
elif engine_name == 'jinja':
import jinja2
tmpl = jinja2.Template(src)
tmpl.filename = filename
return lambda kwargs: literal(tmpl.render(**kwargs))
elif engine_name == 'kajiki':
import kajiki
tmpl = kajiki.XMLTemplate(src)
tmpl = kajiki.XMLTemplate(src, filename=filename)
return lambda kwargs: literal(tmpl(kwargs).render())
elif engine_name == 'chameleon':
import chameleon

0 comments on commit d130c3c

Please sign in to comment.