[Zope3-checkins] CVS: Zope3/src/zope/app/http - configure.zcml:1.9
traversal.py:1.6
Philipp von Weitershausen
philikon at philikon.de
Wed Mar 17 13:24:55 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/http
In directory cvs.zope.org:/tmp/cvs-serv24200/app/http
Modified Files:
configure.zcml traversal.py
Log Message:
The traversing machinery now uses views providing an interface
(IPublishTraverse or subclassing interfaces) instead of views named
"_traverse".
=== Zope3/src/zope/app/http/configure.zcml 1.8 => 1.9 ===
--- Zope3/src/zope/app/http/configure.zcml:1.8 Sat Mar 13 18:34:28 2004
+++ Zope3/src/zope/app/http/configure.zcml Wed Mar 17 13:24:24 2004
@@ -6,17 +6,16 @@
<view
for="zope.app.container.interfaces.ISimpleReadContainer"
- name="_traverse"
type="zope.publisher.interfaces.http.IHTTPRequest"
+ provides="zope.publisher.interfaces.IPublishTraverse"
factory=".traversal.ContainerTraverser"
permission="zope.Public"
- allowed_interface="zope.publisher.interfaces.IPublishTraverse"
/>
<view
for="zope.app.container.interfaces.IItemContainer"
- name="_traverse"
type="zope.publisher.interfaces.http.IHTTPRequest"
+ provides="zope.publisher.interfaces.http.IHTTPPublisher"
factory=".traversal.ItemTraverser"
permission="zope.Public"
allowed_interface="zope.publisher.interfaces.IPublishTraverse"
=== Zope3/src/zope/app/http/traversal.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/http/traversal.py:1.5 Wed Mar 3 05:38:45 2004
+++ Zope3/src/zope/app/http/traversal.py Wed Mar 17 13:24:24 2004
@@ -9,7 +9,7 @@
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
##############################################################################
-"""HTTPP-specific traversers
+"""HTTP-specific traversers
For straight HTTP, we need to be able to create null resources.
We also never traverse to views.
@@ -18,16 +18,14 @@
"""
__metaclass__ = type
-from zope.publisher.interfaces import IPublishTraverse
+from zope.publisher.interfaces.http import IHTTPPublisher
from zope.app.container.interfaces import ISimpleReadContainer, IItemContainer
from zope.app.http.put import NullResource
from zope.exceptions import NotFoundError
from zope.interface import implements
class ContainerTraverser:
-
- implements(IPublishTraverse)
-
+ implements(IHTTPPublisher)
__used_for__ = ISimpleReadContainer
def __init__(self, container, request):
@@ -56,7 +54,6 @@
return NullResource(self.context, name)
class ItemTraverser(ContainerTraverser):
-
__used_for__ = IItemContainer
def publishTraverse(self, request, name):
More information about the Zope3-Checkins
mailing list