[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Container - ContainerTraverser.py:1.1.2.4.14.1

Jim Fulton jim@zope.com
Wed, 29 May 2002 11:10:08 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Container
In directory cvs.zope.org:/tmp/cvs-serv12181/lib/python/Zope/App/OFS/Container

Modified Files:
      Tag: Zope3InWonderland-branch
	ContainerTraverser.py 
Log Message:
- Added permission_id attribute to adapter and utility directives.

- Got rid of old getView, getResource, and getDefaultViewName.
  Renamed getRequestView to getView (and so on).

  Changed view interface to use context, rather than getContext.

  Introduced notion of presentation types (e.g. IBrowserPresentation, 
  which is cleaner than IBrowserPublisher).

- Began converting to get/queryFoo, which is much nicer.

- Many formatting fixups.



=== Zope3/lib/python/Zope/App/OFS/Container/ContainerTraverser.py 1.1.2.4 => 1.1.2.4.14.1 ===
 from Zope.Publisher.Exceptions import NotFound
 from IContainer import IReadContainer
-from Zope.ComponentArchitecture import getRequestView
-from Zope.ComponentArchitecture import getRequestDefaultViewName
+from Zope.ComponentArchitecture import getView
+from Zope.ComponentArchitecture import getDefaultViewName
 
 
 class ContainerTraverser:
@@ -36,7 +36,7 @@
     def publishTraverse(self, request, name):
         c = self._c
         if name.endswith(';view'):
-            p = getRequestView(c, name[:-5], request)
+            p = getView(c, name[:-5], request)
             if p is None:
                 raise NotFound(c, name, request)
             else:
@@ -50,7 +50,7 @@
         """
         """
         c = self._c
-        view_name = getRequestDefaultViewName(c, request)
+        view_name = getDefaultViewName(c, request)
         view_uri = "%s;view" % view_name
         return c, (view_uri,)