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

Brian Lloyd brian@digicool.com
Mon, 19 Nov 2001 17:07:31 -0500


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

Modified Files:
      Tag: Zope-3x-branch
	Traversers.py ZopePublication.py 
Log Message:
fixes for config file stuff

=== Zope3/lib/python/Zope/App/ZopePublication/Traversers.py 1.1.2.1 => 1.1.2.2 ===
 from Zope.Publisher.Exceptions import Unauthorized, NotFound, DebugError
-
-# Need to:
-# - register component
-# - decide on browser_traverse return vals
+from Zope.Publisher.Browser import IBrowserPublisher
 
 
 class DefaultTraverser:
@@ -14,6 +10,7 @@
         self.target = target
 
     def browser_default(self, request):
+        ob = self.target
         if hasattr(ob, 'index_html'):
             ob.index_html, ('index_html',)
         return self.target, None
@@ -35,9 +32,3 @@
             raise DebugError(subob, 'Missing or empty doc string at: %s' %
                              request.getURL())
         return subob
-
-
-# TODO: put this in the config file
-Zope.ComponentArchitecture.providePresentation(
-    None, '_traverse', IBrowserPublisher, DefaultTraverser
-    )


=== Zope3/lib/python/Zope/App/ZopePublication/ZopePublication.py 1.1.2.6 => 1.1.2.7 ===
             return ob.browser_traverse(request, name)
             
-        adapter = getPresentation(ob, '_traverse', IBrowserPublisher, None)
+        adapter = getPresentation(ob, '_traverse', IBrowserPublisher)
         if adapter is not None:
             return adapter.browser_traverse(request, name)