[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/ZopePublication - Traversers.py:1.1.2.6 ZopePublication.py:1.1.2.18

Fred Drake Jr fdrake@acm.org
Wed, 12 Dec 2001 15:41:02 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/ZopePublication
In directory cvs.zope.org:/tmp/cvs-serv15563/Zope/App/ZopePublication

Modified Files:
      Tag: Zope-3x-branch
	Traversers.py ZopePublication.py 
Log Message:
Presentation --> View

=== Zope3/lib/python/Zope/App/ZopePublication/Traversers.py 1.1.2.5 => 1.1.2.6 ===
 from Zope.Publisher.Exceptions import Unauthorized, NotFound, DebugError
 from Zope.Publisher.Browser.IBrowserPublisher import IBrowserPublisher
-from Zope.ComponentArchitecture import getPresentation
+from Zope.ComponentArchitecture import getView
 
 class DefaultTraverser:
     """
@@ -22,8 +22,8 @@
     def browser_default(self, request):
         ob = self.target
         
-        # Use the default presentation.
-        p = getPresentation(ob, '', IBrowserPublisher, None)
+        # Use the default view.
+        p = getView(ob, '', IBrowserPublisher, None)
         if p is None:
             return ob, ()
         
@@ -32,12 +32,12 @@
 
     def browser_traverse(self, request, name):
         """ """
-        # TODO:  Look for default presentation
+        # TODO:  Look for default view
         ob = self.target
         if name[:1] == '_':
             raise Unauthorized("Name %s begins with an underscore" % `name`)
         if name[-5:]==';view':
-            return getPresentation( ob, name[:-5], IBrowserPublisher )
+            return getView( ob, name[:-5], IBrowserPublisher )
         if hasattr(ob, name):
             subob = getattr(ob, name)
         else:


=== Zope3/lib/python/Zope/App/ZopePublication/ZopePublication.py 1.1.2.17 => 1.1.2.18 ===
 from zLOG import LOG, ERROR, INFO
 from Zope.Publisher.Exceptions import NotFound, DebugError
-from Zope.ComponentArchitecture import getPresentation
+from Zope.ComponentArchitecture import getView
 from Zope.Publisher.DefaultPublication import DefaultPublication
 from Zope.Publisher.mapply import mapply
 from Zope.Publisher.Exceptions import Retry
@@ -141,7 +141,7 @@
         if IBrowserPublisher.isImplementedBy(ob):
             ob2 = ob.browser_traverse(request, name)
         else:
-            adapter = getPresentation(ob, '_traverse', IBrowserPublisher)
+            adapter = getView(ob, '_traverse', IBrowserPublisher)
             if adapter is not None:
                 ob2 =  adapter.browser_traverse(request, name)
             else:
@@ -155,7 +155,7 @@
         if IBrowserPublisher.isImplementedBy(ob):
             r = ob.browser_default(request)
         else:
-            adapter = getPresentation(ob, '_traverse', IBrowserPublisher, None)
+            adapter = getView(ob, '_traverse', IBrowserPublisher, None)
             if adapter is not None:
                 r = adapter.browser_default(request)
             else: