[Zope-Checkins] CVS: Zope3/lib/python/Zope/PageTemplate - ViewZPT.py:1.1.2.2
Chris Humphries
zopemonkey@yahoo.com
Sun, 24 Mar 2002 09:53:23 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/PageTemplate
In directory cvs.zope.org:/tmp/cvs-serv26474/lib/python/Zope/PageTemplate
Modified Files:
Tag: Zope-3x-branch
ViewZPT.py
Log Message:
Modified to where zpt's do not require context anymore.
(jim)
=== Zope3/lib/python/Zope/PageTemplate/ViewZPT.py 1.1.2.1 => 1.1.2.2 ===
# instance is a View component
namespace = ZPT.pt_getContext(self, instance=instance, **keywords)
- namespace['here'] = instance.getContext()
+
+ here = getattr(instance, 'getContext', None)
+ if here is not None:
+ namespace['here'] = here()
+
namespace['views'] = ViewMapper(namespace['here'],
namespace['request'])
return namespace