[Zope3-checkins] CVS: Zope3/src/zope/app/services - view.py:1.29

Jim Fulton jim@zope.com
Mon, 30 Jun 2003 12:37:45 -0400


Update of /cvs-repository/Zope3/src/zope/app/services
In directory cvs.zope.org:/tmp/cvs-serv20472/src/zope/app/services

Modified Files:
	view.py 
Log Message:
Changed module-global lookup logic to use the module-lookup methods of
registration manager containers.


=== Zope3/src/zope/app/services/view.py 1.28 => 1.29 ===
--- Zope3/src/zope/app/services/view.py:1.28	Tue Jun 24 11:38:04 2003
+++ Zope3/src/zope/app/services/view.py	Mon Jun 30 12:37:13 2003
@@ -18,6 +18,7 @@
 
 from __future__ import generators
 
+from zope.app import zapi
 from persistence import Persistent
 from persistence.dict import PersistentDict
 
@@ -28,8 +29,8 @@
 
 from zope.app.i18n import ZopeMessageIDFactory as _
 from zope.app.interfaces.services.interface import IInterfaceBasedRegistry
-from zope.app.interfaces.services.registration \
-     import IRegistry, IRegistration, ActiveStatus
+from zope.app.interfaces.services.registration import ActiveStatus
+from zope.app.interfaces.services.registration import IRegistry, IRegistration
 from zope.app.services.registration import RegistrationStack
 from zope.app.services.registration import SimpleRegistration
 from zope.app.services.servicenames import Views
@@ -278,8 +279,8 @@
         self.permission = permission
 
     def getView(self, object, request):
-        sm = zapi.getServiceManager(self)
-        factory = sm.resolve(self.class_)
+        folder = zapi.getWrapperContainer(zapi.getWrapperContainer(self))
+        factory = folder.resolve(self.class_)
         return factory(object, request)
 
     getView = zapi.ContextMethod(getView)