[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services/registration - __init__.py:1.17

Jim Fulton jim at zope.com
Sat Mar 6 11:50:45 EST 2004


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

Modified Files:
	__init__.py 
Log Message:
Converted most getAdapter calls to use interface calls instead.


=== Zope3/src/zope/app/browser/services/registration/__init__.py 1.16 => 1.17 ===
--- Zope3/src/zope/app/browser/services/registration/__init__.py:1.16	Fri Mar  5 17:08:56 2004
+++ Zope3/src/zope/app/browser/services/registration/__init__.py	Sat Mar  6 11:50:14 2004
@@ -29,7 +29,7 @@
 from zope.app.interfaces.services.registration import ActiveStatus
 from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
 from zope.app.traversing import getName, traverse
-from zope.component import getView, getServiceManager, getAdapter
+from zope.component import getView, getServiceManager
 from zope.proxy import removeAllProxies
 from zope.app.publisher.browser import BrowserView
 from zope.interface import implements
@@ -83,7 +83,7 @@
 
     def __init__(self, context, request):
         super(RegistrationView, self).__init__(context, request)
-        useconfig = getAdapter(self.context, IRegistered)
+        useconfig = IRegistered(self.context)
         self.registrations = useconfig.registrations()
 
     def update(self):
@@ -122,7 +122,7 @@
 
     def uses(self):
         component = self.context
-        useconfig = getAdapter(component, IRegistered)
+        useconfig = IRegistered(component)
         result = []
         for path in useconfig.usages():
             config = traverse(component, path)
@@ -310,7 +310,7 @@
         folder = component.__parent__
         rm = folder.getRegistrationManager()
 
-        name = getAdapter(rm, INameChooser).chooseName('', registration)
+        name = INameChooser(rm).chooseName('', registration)
         rm[name] = registration
         return registration
 




More information about the Zope3-Checkins mailing list