Chris Withers wrote:
I'm still continuing poking around (when I have the chance) to see how
I'd get Zope running without ZODB.
Does the following line:
db = zope.app.appsetup.appsetup.multi_database(options.databases)
Note that there are two main.py files, one for zope.server in
zope.app.server and one for twisted.web2 in zope.app.twisted.
...mean that Zope 3 is currently hard-coded to need a ZODB?
If so, how should we go about making this optional?
We would check if options.databases if empty. If that's so, we could set
The 'db' object (the database) gets passed a long to the ServerTypes
which pass it along to the WSGIPublisherApplication which then passes it
along to the request/publication factory. This way, when a new request
is created and a publication object with it, the publication has the
database to start traversal off of. As far as I can see it, the
publication is the only component in that whole chain that expects the
'db' object NOT to be None. So, you'd have to write your own publication
that wouldn't use the 'db' object for a traversal root but your own
custom object, e.g.:
"""Mix this in with BrowserPublication, HTTPPublication, etc."""
def getApplication(self, request):
stack = request.getTraversalStack()
if '++etc++process' in stack:
myroot = RootObject()
(I am willing to put the work in to make this happen if people give me
Changing zope.app.server.main and .twisted.main to accept an empty
database section in zope.conf and thus set 'db=None' would probably be
all that's needed, plus your custom publication that ignores the 'db'
argument. Would be cool if you could document this, though :)
http://worldcookery.com -- Professional Zope documentation and training
2nd edition of Web Component Development with Zope 3 is now shipping!
Zope3-dev mailing list