[Zope-Checkins] CVS: Zope3 - z3.py:1.1.2.4
Brian Lloyd
brian@digicool.com
Mon, 19 Nov 2001 15:41:03 -0500
Update of /cvs-repository/Zope3
In directory cvs.zope.org:/tmp/cvs-serv24662
Modified Files:
Tag: Zope-3x-branch
z3.py
Log Message:
change to use BrowserPublication
=== Zope3/z3.py 1.1.2.3 => 1.1.2.4 ===
-from Zope.App.ZopePublication.ZopePublication import ZopePublication
+from Zope.App.ZopePublication.ZopePublication import BrowserPublication
from Zope.Publisher.HTTP.BrowserPayload import BrowserRequestPayload, \
BrowserResponsePayload
+from Zope.App.OFS.RootFolder import RootFolder
import Zope.Server, asyncore, zLOG
Zope.Server.setNumberOfThreads(4)
-class App:
+
+class App(RootFolder):
""" """
+ __implements__ = IBrowserPublisher
def __call__(self, URL):
return 'You have reached the wrong number. Please try again later.'
+ def index_html(self):
+ return 'You have reached the index_html method. Death to index_html!'
+
+
zLOG._set_log_dest(sys.stderr)
server = Zope.Server.zhttp_server('', 8080)
-publication = ZopePublication(App())
+publication = BrowserPublication(App())
request_payload = BrowserRequestPayload(publication)
response_payload = BrowserResponsePayload()
handler = Zope.Server.zhttp_handler(request_payload, response_payload, '', {})