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

Steve Alexander steve@cat-box.net
Thu, 14 Feb 2002 14:22:45 -0500


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

Modified Files:
      Tag: Zope-3x-branch
	ContainerTraverser.py 
Log Message:
Changed browser_default method in line with current arrangements for discovering the default view.


=== Zope3/lib/python/Zope/App/OFS/ContainerTraverser.py 1.1.2.5 => 1.1.2.6 ===
 from IContainer import IReadContainer
 from Zope.ComponentArchitecture import getRequestView
+from Zope.ComponentArchitecture import getRequestDefaultViewName
 
 
 class ContainerTraverser:
@@ -44,7 +45,7 @@
         """
         """
         c = self._c
-        p = getRequestView(c, '', request)
-        if p is None:
-            raise NotFound
-        return p.browser_default(request)
+        view_name = getRequestDefaultViewName(c, request)
+        view_uri = "%s;view" % view_name
+        return c, (view_uri,)
+