[Zope3-checkins] CVS: Zope3/src/zope/app/traversing -
namespace.py:1.22
Jim Fulton
cvs-admin at zope.org
Fri Nov 21 12:09:37 EST 2003
Update of /cvs-repository/Zope3/src/zope/app/traversing
In directory cvs.zope.org:/tmp/cvs-serv29691/src/zope/app/traversing
Modified Files:
namespace.py
Log Message:
Changed to the presentation service and to use zapi.
=== Zope3/src/zope/app/traversing/namespace.py 1.21 => 1.22 ===
--- Zope3/src/zope/app/traversing/namespace.py:1.21 Mon Oct 6 18:08:53 2003
+++ Zope3/src/zope/app/traversing/namespace.py Fri Nov 21 12:09:36 2003
@@ -15,10 +15,8 @@
$Id$
"""
+from zope.app import zapi
from zope.exceptions import NotFoundError
-from zope.component import queryAdapter
-from zope.component import queryDefaultViewName, queryView, getService
-from zope.app.services.servicenames import Resources
from zope.app.interfaces.traversing import ITraversable
from zope.proxy import removeAllProxies
import re
@@ -91,8 +89,8 @@
return resource
def queryResourceInContext(ob, name, request, default=None):
- resource_service = getService(ob, Resources)
- resource = resource_service.queryResource(ob, name, request)
+ resource_service = zapi.getService(ob, zapi.servicenames.Presentation)
+ resource = resource_service.queryResource(name, request)
if resource is None:
return default
@@ -116,7 +114,7 @@
origOb = ob
while i < 200:
i += 1
- traversable = queryAdapter(ob, ITraversable, None)
+ traversable = zapi.queryAdapter(ob, ITraversable, None)
if traversable is not None:
try:
@@ -181,14 +179,14 @@
def help(name, parameters, pname, ob, request):
"""Used to traverse to an online help topic."""
- return getService(ob, 'OnlineHelp')
+ return zapi.getService(ob, 'OnlineHelp')
def view(name, parameters, pname, ob, request):
if parameters:
raise UnexpectedParameters(parameters)
if not request:
raise NoRequest(pname)
- view = queryView(ob, name, request)
+ view = zapi.queryView(ob, name, request)
if view is None:
raise NotFoundError(ob, name)
More information about the Zope3-Checkins
mailing list