[Zope3-checkins] CVS: Zope3/src/zope/app/services - view.py:1.30
Viktorija Zaksiene
ryzaja@codeworks.lt
Fri, 4 Jul 2003 09:28:51 -0400
Update of /cvs-repository/Zope3/src/zope/app/services
In directory cvs.zope.org:/tmp/cvs-serv2662
Modified Files:
view.py
Log Message:
Fixed PageRegistration and tests for it. Now it uses module-lookup methods of
registration manager containers.
=== Zope3/src/zope/app/services/view.py 1.29 => 1.30 ===
--- Zope3/src/zope/app/services/view.py:1.29 Mon Jun 30 12:37:13 2003
+++ Zope3/src/zope/app/services/view.py Fri Jul 4 09:28:16 2003
@@ -18,7 +18,6 @@
from __future__ import generators
-from zope.app import zapi
from persistence import Persistent
from persistence.dict import PersistentDict
@@ -230,7 +229,7 @@
def getRegistrationsForInterface(self, iface):
for t in self.gvs.getRegisteredMatching(required_interfaces=[iface]):
yield GlobalViewRegistration(*t)
-
+
class GlobalViewRegistration:
"""Registrations representing global view service thingies."""
@@ -295,7 +294,7 @@
if self.layer and self.layer != "default":
L.extend([_("in layer"), self.layer])
return " ".join(L)
-
+
class PageRegistration(ViewRegistration):
implements(IPageRegistration)
@@ -353,13 +352,13 @@
def getView(self, object, request):
-
self.validate()
sm = zapi.getServiceManager(self)
if self.class_:
- class_ = sm.resolve(self.class_)
+ folder = zapi.getWrapperContainer(zapi.getWrapperContainer(self))
+ class_ = folder.resolve(self.class_)
class_ = type(class_.__name__, (class_, DefaultClass), {})
else:
class_ = DefaultClass