[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/ZopePublication - PublicationTraverse.py:1.1.2.5 Traversers.py:1.1.2.13 zopepublication.zcml:1.1.2.3
Stephan Richter
srichter@cbu.edu
Wed, 27 Mar 2002 15:48:54 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/ZopePublication
In directory cvs.zope.org:/tmp/cvs-serv21889/App/ZopePublication
Modified Files:
Tag: Zope-3x-branch
PublicationTraverse.py Traversers.py zopepublication.zcml
Log Message:
Fixed one I think.
=== Zope3/lib/python/Zope/App/ZopePublication/PublicationTraverse.py 1.1.2.4 => 1.1.2.5 ===
"""
+from Zope.Publisher.Browser.IBrowserPublisher import IBrowserPublisher
from Zope.ComponentArchitecture import getRequestView
from Zope.App.Security.SecurityManagement import getSecurityManager
from Zope.Publisher.Exceptions import NotFound
from types import StringTypes
-from Zope.ContextWrapper import Wrapper
+from Zope.ContextWrapper import wrapper
class DuplicateNamespaces(Exception):
"""More than one namespave was specified in a request"""
@@ -84,12 +85,13 @@
if nm == '.':
return ob
-
- if request.getViewType().isImplementedBy(ob):
+
+ if IBrowserPublisher.isImplementedBy(ob):
ob2 = ob.publishTraverse(request, nm)
else:
adapter = getRequestView(ob, '_traverse', request, self # marker
)
+
if adapter is not self:
ob2 = adapter.publishTraverse(request, nm)
else:
@@ -98,7 +100,7 @@
return self._wrap(ob2, ob, name, nm)
def _wrap(self, ob, parent, name, nm):
- wrapped = Wrapper(ob, parent, name=name)
+ wrapped = wrapper.Wrapper(ob, parent, name=name)
getSecurityManager().validate(nm, wrapped)
return wrapped
=== Zope3/lib/python/Zope/App/ZopePublication/Traversers.py 1.1.2.12 => 1.1.2.13 ===
from Zope.Publisher.Exceptions import Unauthorized, NotFound, DebugError
from Zope.Publisher.Browser.IBrowserPublisher import IBrowserPublisher
-from Zope.Publisher.XMLRPC.IXMLRPCPublisher import IXMLRPCPublisher
from Zope.ComponentArchitecture \
import getRequestView, getRequestDefaultViewName
class DefaultTraverser:
"""
"""
- __implements__ = IBrowserPublisher, IXMLRPCPublisher
+ __implements__ = IBrowserPublisher
def __init__(self, target):
self.target = target
@@ -37,7 +36,6 @@
def publishTraverse(self, request, name):
""" """
-
# TODO: Look for default view
ob = self.target
if name.startswith('_'):
@@ -54,4 +52,3 @@
raise NotFound(ob, name, request)
return subob
-
=== Zope3/lib/python/Zope/App/ZopePublication/zopepublication.zcml 1.1.2.2 => 1.1.2.3 ===
>
- <browser:view name="_traverse"
- factory=".Traversers.DefaultTraverser." />
+<browser:view name="_traverse"
+ factory="Zope.App.ZopePublication.Traversers.DefaultTraverser." />
<xmlrpc:view name="_traverse"
factory=".Traversers.DefaultTraverser." />