RE: how to get a URL-based session dictionary working with Extern alObjects? alObjects?
Michel Pelletier wrote:
I believe, possibly on the old site, that there is a Zope produce that lets you plug bobo apps directly into the Zope space with no modification.
http://www.zope.org:8080/Download/Contrib/ExternalObjects.tar.gz
I think this is it. Someone probably needs to adopt this orphaned child. (I think maybe Amos wrote it, Amos?)
Yes, it's my fault ;-) Michael Olivier wrote:
Belated thanks on this help with ExternalObjects, Michel. I got this working with our ZPublisher/PCGI objects into zope, but I'm stuck on one issue: we encode the HTTP session in the URL, and have a dictionary class that is invoked to get the session object from a __getitem__() call. It works file with ZPublisher but isn't working with ExternalObjects in Zope.
A sample URL is:
localhost/Zope/sess/Z8Q/home
...where sess is an external object declared in zope containing a dictionary with an entry for Z8Q. I am using the old BoboDictionary, subclassed to override __getitem__() with code to look up the Z8Q key and return a session object. I also set __getattr__ = __getitem__ ...
This all seems reasonable, though I don't think you need to set __getattr__ to __getitem__.
Michel, Amos, anyone -- ideas for what's going wrong, or what else I need to do? (Error output below.)
Well this traceback indicates that when ZPublisher does a getitem on your object to find a subobject it's getting an exception. (See lines 330 and following of ZPublisher/BaseRequest.py) You should figure out what this exception is, and why it's being raised. Good luck! -Amos BTW, if your old bobo app uses BoboPOS, there could be problems incorporating it into Zope... -- Amos Latteier mailto:amos@digicool.com Digital Creations http://www.digicool.com
participants (1)
-
Amos Latteier