Subject: | include and keywords |
Date: | Fri, 2 Oct 2015 23:02:03 +0200 |
To: | bug-Tenjin [...] rt.cpan.org |
From: | Michael Lipp <mnl [...] mnl.de> |
Hi,
I think I have found a problem. I have a template with an argument
"portal". I want to include another template and pass that argument on.
This results in:
<?py include("sub.pyhtml", portal=portal) ?>
This results in an error:
ERROR: (<type 'exceptions.KeyError'>) 'portal'
File "/home/mnl/ownCloud/devel/CircuitsMinimalPortal/circuits_minpor/utils/misc.py", line 68, in serve_tenjin
response.body = engine.render(path, context, globals = globs)
File "/usr/lib/python2.7/site-packages/Tenjin-1.1.1-py2.7.egg/tenjin.py", line 1972, in render
content = template.render(context, globals)
File "/usr/lib/python2.7/site-packages/Tenjin-1.1.1-py2.7.egg/tenjin.py", line 991, in render
exec(self.bytecode, globals, locals)
File "/home/mnl/ownCloud/devel/CircuitsMinimalPortal/circuits_minpor/portal/../templates/portal.pyhtml", line 103, in <module>
tab=selected, portlets=portal.portlets, locales=locales) ?>
File "/usr/lib/python2.7/site-packages/Tenjin-1.1.1-py2.7.egg/tenjin.py", line 1944, in include
del context[k]
Regards,
Michael