[Checkins] SVN: z3c.pt/trunk/src/z3c/pt/pagetemplate.py For procedural usage, the ViewPageTemplateFile property should be callable.
Malthe Borch
mborch at gmail.com
Fri Aug 29 07:57:13 EDT 2008
Log message for revision 90575:
For procedural usage, the ViewPageTemplateFile property should be callable.
Changed:
U z3c.pt/trunk/src/z3c/pt/pagetemplate.py
-=-
Modified: z3c.pt/trunk/src/z3c/pt/pagetemplate.py
===================================================================
--- z3c.pt/trunk/src/z3c/pt/pagetemplate.py 2008-08-29 10:59:35 UTC (rev 90574)
+++ z3c.pt/trunk/src/z3c/pt/pagetemplate.py 2008-08-29 11:57:12 UTC (rev 90575)
@@ -90,3 +90,7 @@
self.template = PageTemplateFile(filename)
property.__init__(self, self.render)
+
+ def __call__(self, view, **kwargs):
+ template = self.render(view)
+ return template(**kwargs)
More information about the Checkins
mailing list