[Zope-Checkins] CVS: Zope3/lib/python/Zope/PageTemplate - SimpleViewClass.py:1.1.2.3
Andreas Jung
andreas@digicool.com
Thu, 10 Jan 2002 15:29:27 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/PageTemplate
In directory cvs.zope.org:/tmp/cvs-serv31471
Modified Files:
Tag: Zope-3x-branch
SimpleViewClass.py
Log Message:
- added tests for SimpleViewClass
- made SImpleViewClass callable
- made SImpleViewCLass instances into macro collections
=== Zope3/lib/python/Zope/PageTemplate/SimpleViewClass.py 1.1.2.2 => 1.1.2.3 ===
return self.index, ()
+ # XXX: we need some unittests for this !!!
+ def __getitem__(self, name):
+ return self.index.macros[name]
+
+ def __call__(self,*args,**kw):
+ return self.index(*args,**kw)
+
+
def SimpleViewClass(src, offering=None, used_for=None):
if offering is None:
offering = sys._getframe(1).f_globals