[Zope-Checkins] SVN: Products.Five/branches/publication-refactor2/
define Zope2 specific request traversal type and
Michael Kerrin
michael.kerrin at openapp.biz
Fri Apr 21 14:14:09 EDT 2006
Log message for revision 67247:
define Zope2 specific request traversal type and
configure the IPublisTraverse adapter in ZPublisher.Publication
Changed:
U Products.Five/branches/publication-refactor2/browser/metaconfigure.py
U Products.Five/branches/publication-refactor2/configure.zcml
U Products.Five/branches/publication-refactor2/interfaces.py
-=-
Modified: Products.Five/branches/publication-refactor2/browser/metaconfigure.py
===================================================================
--- Products.Five/branches/publication-refactor2/browser/metaconfigure.py 2006-04-21 18:10:19 UTC (rev 67246)
+++ Products.Five/branches/publication-refactor2/browser/metaconfigure.py 2006-04-21 18:14:08 UTC (rev 67247)
@@ -20,6 +20,7 @@
"""
import os
+from zope.app import zapi
from zope.interface import Interface
from zope.configuration.exceptions import ConfigurationError
from zope.publisher.interfaces.browser import IBrowserRequest, \
Modified: Products.Five/branches/publication-refactor2/configure.zcml
===================================================================
--- Products.Five/branches/publication-refactor2/configure.zcml 2006-04-21 18:10:19 UTC (rev 67246)
+++ Products.Five/branches/publication-refactor2/configure.zcml 2006-04-21 18:14:08 UTC (rev 67247)
@@ -44,4 +44,20 @@
interface="zope.publisher.interfaces.browser.IBrowserRequest"
/>
+ <five:implements class="ZPublisher.HTTPRequest.HTTPRequest"
+ interface=".interfaces.IZope2Request"
+ />
+ <adapter
+ for=".interfaces.IZope2Request"
+ factory="ZPublisher.Publication.Zope3HTTPRequestTraverser"
+ provides="zope.publisher.interfaces.ITraversingRequest"
+ />
+
+ <adapter
+ for="*
+ .interfaces.IZope2Request"
+ provides="zope.publisher.interfaces.IPublishTraverse"
+ factory="ZPublisher.Publication.Zope2PublishTraverseAdapter"
+ />
+
</configure>
Modified: Products.Five/branches/publication-refactor2/interfaces.py
===================================================================
--- Products.Five/branches/publication-refactor2/interfaces.py 2006-04-21 18:10:19 UTC (rev 67246)
+++ Products.Five/branches/publication-refactor2/interfaces.py 2006-04-21 18:14:08 UTC (rev 67247)
@@ -27,6 +27,10 @@
find the method to be published.
"""
+class IZope2Request(Interface):
+ """Marks the Zope2 request"""
+ pass
+
class IMenuItemType(IInterface):
"""Menu item type
More information about the Zope-Checkins
mailing list