[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Traversing - AcquireNamespace.py:1.1.2.1.4.1 AttrItemNamespaces.py:1.1.2.1.4.1 PresentationNamespaces.py:1.1.2.1.4.1 Traverser.py:1.1.2.11.4.1
Jim Fulton
jim@zope.com
Wed, 29 May 2002 11:10:17 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/Traversing
In directory cvs.zope.org:/tmp/cvs-serv12181/lib/python/Zope/App/Traversing
Modified Files:
Tag: Zope3InWonderland-branch
AcquireNamespace.py AttrItemNamespaces.py
PresentationNamespaces.py Traverser.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/Traversing/AcquireNamespace.py 1.1.2.1 => 1.1.2.1.4.1 ===
from Exceptions import UnexpectedParameters
from Zope.Exceptions import NotFoundError
-from Zope.ComponentArchitecture import getAdapter
+from Zope.ComponentArchitecture import queryAdapter
from Zope.Proxy.ContextWrapper import ContextWrapper, getWrapperContext
from ITraversable import ITraversable
@@ -34,7 +34,7 @@
origOb = ob
while i < 200:
i += 1
- traversable = getAdapter(ob, ITraversable, None)
+ traversable = queryAdapter(ob, ITraversable, None)
if traversable is not None:
try:
=== Zope3/lib/python/Zope/App/Traversing/AttrItemNamespaces.py 1.1.2.1 => 1.1.2.1.4.1 ===
"""
-from Zope.ComponentArchitecture import getRequestView, getRequestResource
from Namespaces import provideNamespaceHandler
from Exceptions import UnexpectedParameters
=== Zope3/lib/python/Zope/App/Traversing/PresentationNamespaces.py 1.1.2.1 => 1.1.2.1.4.1 ===
"""
-from Zope.ComponentArchitecture import getRequestView, getRequestResource
+from Zope.ComponentArchitecture import getView, getResource
from Namespaces import provideNamespaceHandler
from Exceptions import UnexpectedParameters
from Zope.Exceptions import NotFoundError
@@ -30,7 +30,7 @@
raise UnexpectedParameters(parameters)
if not request:
raise NoRequest(pname)
- return getRequestView(ob, name, request)
+ return getView(ob, name, request)
provideNamespaceHandler('view', view)
@@ -39,7 +39,7 @@
raise UnexpectedParameters(parameters)
if not request:
raise NoRequest(pname)
- return getRequestResource(ob, name, request)
+ return getResource(ob, name, request)
provideNamespaceHandler('resource', resource)
=== Zope3/lib/python/Zope/App/Traversing/Traverser.py 1.1.2.11 => 1.1.2.11.4.1 ===
from Zope.Proxy.ContextWrapper import getWrapperContext, getWrapperData
from Zope.Proxy.ContextWrapper import ContextWrapper
-from Zope.ComponentArchitecture import getAdapter
+from Zope.ComponentArchitecture import queryAdapter
from Zope.Exceptions import NotFoundError, Unauthorized
from Namespaces import namespaceLookup
from ParameterParsing import parameterizedNameParse
@@ -107,7 +107,7 @@
parms = ()
nm = name
- traversable = getAdapter(curr, ITraversable, None)
+ traversable = queryAdapter(curr, ITraversable, None)
if traversable is None:
raise NotFoundError, 'No traversable adapter found'