[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/ZopePublication - ZopePublication.py:1.1.2.28.2.1
Jim Fulton
jim@zope.com
Sat, 16 Mar 2002 09:44:30 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/ZopePublication
In directory cvs.zope.org:/tmp/cvs-serv24057/python/Zope/App/ZopePublication
Modified Files:
Tag: Zope3-publisher-refactor-branch
ZopePublication.py
Log Message:
Checking in partial publisher refactoring on the
Zope3-publisher-refactor-branch branch to facilitate collaboration
with Stephan.
=== Zope3/lib/python/Zope/App/ZopePublication/ZopePublication.py 1.1.2.28 => 1.1.2.28.2.1 ===
-class ZopePublication(DefaultPublication):
+class ZopePublication(DefaultPublication, PublicationTraverse):
"""Base Zope publication specification."""
version_cookie = 'Zope-Version'
@@ -76,7 +76,7 @@
conn = self.db.open(version)
cleanup = Cleanup(conn.close)
- request._hold(cleanup) # Close the connection on request.close()
+ request.hold(cleanup) # Close the connection on request.close()
self.openedConnection(conn)
## conn.setDebugInfo(getattr(request, 'environ', None), request.other)
@@ -151,29 +151,6 @@
exc_info = 0
-class BrowserPublication(PublicationTraverse, ZopePublication):
- """Web browser (HTTP) publication handling."""
-
-
def _parameterSetskin(self, pname, pval, request):
request.setViewSkin(pval)
-
- def getDefaultTraversal(self, request, ob):
-
- r = ()
-
- if IBrowserPublisher.isImplementedBy(ob):
- r = ob.browser_default(request)
- else:
- adapter = getRequestView(ob, '_traverse', request , None)
- if adapter is not None:
- r = adapter.browser_default(request)
- else:
- return (ob, None)
-
- if r[0] is ob: return r
-
- wrapped = wrapper.Wrapper(r[0], ob, name=None)
- getSecurityManager().validate(None, wrapped)
- return (wrapped, r[1])