[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/ZopePublication - Traversers.py:1.1.2.3 ZopePublication.py:1.1.2.8 __init__.py:1.1.2.2
Tres Seaver
tseaver@zope.com
Tue, 20 Nov 2001 10:05:58 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/ZopePublication
In directory cvs.zope.org:/tmp/cvs-serv29829/lib/python/Zope/App/ZopePublication
Modified Files:
Tag: Zope-3x-branch
Traversers.py ZopePublication.py __init__.py
Log Message:
- Yeehaw!
=== Zope3/lib/python/Zope/App/ZopePublication/Traversers.py 1.1.2.2 => 1.1.2.3 ===
-from Zope.Publisher.Browser import IBrowserPublisher
+# This software is subject to the provisions of the Zope Public License,
+# Version 1.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+from Zope.Publisher.Exceptions import Unauthorized, NotFound, DebugError
+from Zope.Publisher.Browser.IBrowserPublisher import IBrowserPublisher
+from Zope.ComponentArchitecture import getPresentation
class DefaultTraverser:
- """ """
+ """
+ """
__implements__ = IBrowserPublisher
def __init__(self, target):
@@ -17,9 +25,12 @@
def browser_traverse(self, request, name):
""" """
+ # TODO: Look for default presentation
ob = self.target
if name[:1] == '_':
raise Unauthorized("Name %s begins with an underscore" % `name`)
+ if name[-5:]==';view':
+ return getPresentation( ob, name[:-5], IBrowserPublisher )
if hasattr(ob, name):
subob = getattr(ob, name)
else:
=== Zope3/lib/python/Zope/App/ZopePublication/ZopePublication.py 1.1.2.7 => 1.1.2.8 ===
+# This software is subject to the provisions of the Zope Public License,
+# Version 1.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
import sys
@@ -124,7 +129,7 @@
return response
-from Zope.Publisher.Browser import IBrowserPublisher
+from Zope.Publisher.Browser.IBrowserPublisher import IBrowserPublisher
class BrowserPublication(ZopePublication):
"""Web browser (HTTP) publication handling."""
=== Zope3/lib/python/Zope/App/ZopePublication/__init__.py 1.1.2.1 => 1.1.2.2 ===
+# Version 1.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+
"""
Zope publication package.
"""