[Zope3-checkins] CVS: Zope3/src/zope/publisher - base.py:1.11.10.1
browser.py:1.20.28.1 ftp.py:1.6.28.1 http.py:1.35.10.1
xmlrpc.py:1.9.12.1
Jim Fulton
cvs-admin at zope.org
Sun Nov 9 11:09:05 EST 2003
Update of /cvs-repository/Zope3/src/zope/publisher
In directory cvs.zope.org:/tmp/cvs-serv15349/src/zope/publisher
Modified Files:
Tag: adaptergeddon-branch
base.py browser.py ftp.py http.py xmlrpc.py
Log Message:
Created a global presentation service that replaces the
global view, resource, and skin services.
Now look up presentation components by adapting from a request type,
rather than adapting to a presentation type.
=== Zope3/src/zope/publisher/base.py 1.11 => 1.11.10.1 ===
--- Zope3/src/zope/publisher/base.py:1.11 Sun Aug 17 02:09:14 2003
+++ Zope3/src/zope/publisher/base.py Sun Nov 9 11:08:34 2003
@@ -294,21 +294,6 @@
'See IPresentationRequest'
return getattr(self, '_presentation_skin', '')
- def getPresentationType(self):
- 'See IPresentationRequest'
- return getattr(self, '_presentation_type', None)
-
- # This is not part of the interface:
- def setViewType(self, viewtype):
- '''Set the view type.
-
- This method will normally only be called in tests, which will allow
- us to use a simpler Request set-up.'''
-
- # XXX This will probably go away
-
- self._presentation_type = viewtype
-
def _getBody(self):
body = getattr(self, '_body', None)
if body is None:
=== Zope3/src/zope/publisher/browser.py 1.20 => 1.20.28.1 ===
--- Zope3/src/zope/publisher/browser.py:1.20 Mon Jun 9 12:39:14 2003
+++ Zope3/src/zope/publisher/browser.py Sun Nov 9 11:08:34 2003
@@ -23,7 +23,6 @@
from zope.interface import implements
from zope.i18n.interfaces import IUserPreferredLanguages
from zope.i18n.interfaces import IUserPreferredCharsets
-from zope.publisher.interfaces.browser import IBrowserPresentation
from zope.publisher.interfaces.browser import IBrowserRequest
from zope.publisher.interfaces.browser import IBrowserApplicationRequest
@@ -237,11 +236,6 @@
use_redirect = 0 # Set this to 1 in a subclass to redirect GET
# requests when the effective and actual URLs differ.
- # _presentation_type is overridden from the BaseRequest
- # to implement IBrowserPresentation
- _presentation_type = IBrowserPresentation
-
-
def __init__(self, body_instream, outstream, environ, response=None):
self.form = {}
@@ -711,6 +705,7 @@
def __init__(self,
body_instream=None, outstream=None, environ=None, form=None,
+ skin='default',
**kw):
_testEnv = {
@@ -735,6 +730,8 @@
super(TestRequest, self).__init__(body_instream, outstream, _testEnv)
if form:
self.form.update(form)
+
+ self.setPresentationSkin(skin)
def setUser(self, user):
# HTTPRequest needs to notify the HTTPTask of the username.
=== Zope3/src/zope/publisher/ftp.py 1.6 => 1.6.28.1 ===
--- Zope3/src/zope/publisher/ftp.py:1.6 Tue Jun 3 18:46:27 2003
+++ Zope3/src/zope/publisher/ftp.py Sun Nov 9 11:08:34 2003
@@ -17,8 +17,7 @@
"""
from zope.interface import implements
-from zope.publisher.interfaces.ftp import IFTPPresentation
-from zope.publisher.interfaces.ftp import IFTPCredentials
+from zope.publisher.interfaces.ftp import IFTPCredentials, IFTPRequest
from zope.publisher.base import BaseResponse, BaseRequest
class FTPResponse(BaseResponse):
@@ -37,9 +36,7 @@
self._exc = exc_info
class FTPRequest(BaseRequest):
- implements(IFTPCredentials)
-
- _presentation_type = IFTPPresentation
+ implements(IFTPCredentials, IFTPRequest)
__slots__ = '_auth'
=== Zope3/src/zope/publisher/http.py 1.35 => 1.35.10.1 ===
--- Zope3/src/zope/publisher/http.py:1.35 Sun Aug 17 02:09:14 2003
+++ Zope3/src/zope/publisher/http.py Sun Nov 9 11:08:34 2003
@@ -28,7 +28,6 @@
from zope.publisher.interfaces.http import IHTTPRequest
from zope.publisher.interfaces.http import IHTTPApplicationRequest
from zope.publisher.interfaces.http import IHTTPPublisher
-from zope.publisher.interfaces.http import IHTTPPresentation
from zope.publisher.interfaces import Redirect
from zope.publisher.interfaces.http import IHTTPResponse
@@ -264,9 +263,6 @@
values will be looked up in the order: environment variables,
other variables, form data, and then cookies.
"""
-
- _presentation_type = IHTTPPresentation
-
implements(IHTTPCredentials, IHTTPRequest, IHTTPApplicationRequest)
=== Zope3/src/zope/publisher/xmlrpc.py 1.9 => 1.9.12.1 ===
--- Zope3/src/zope/publisher/xmlrpc.py:1.9 Mon Aug 4 19:19:23 2003
+++ Zope3/src/zope/publisher/xmlrpc.py Sun Nov 9 11:08:34 2003
@@ -24,8 +24,7 @@
from zope.interface import implements
from zope.publisher.interfaces.xmlrpc import IXMLRPCPublisher
-from zope.publisher.interfaces.xmlrpc import IXMLRPCPublication
-from zope.publisher.interfaces.xmlrpc import IXMLRPCPresentation
+from zope.publisher.interfaces.xmlrpc import IXMLRPCRequest
from zope.publisher.interfaces.xmlrpc import IXMLRPCView
from zope.publisher.http import HTTPRequest, HTTPResponse
@@ -58,11 +57,7 @@
class XMLRPCRequest(HTTPRequest):
- implements(IXMLRPCPublication)
-
- # _presentation_type is overridden from the BaseRequest
- # to implement IXMLRPCPublisher
- _presentation_type = IXMLRPCPresentation
+ implements(IXMLRPCRequest)
_args = ()
More information about the Zope3-Checkins
mailing list