[Zope-dev] how to get a URL-based session dictionary working with ExternalObjects?

Michael Olivier michael@local2me.com
Sun, 02 Jan 2000 16:31:32 -0800


At 10:28 AM 9/23/1999 -0400, Michel Pelletier wrote:

> > From: Michael Olivier [mailto:mo@local2me.com]
> > To: zope-dev@zope.org
> > Subject: RE: [Zope-dev] "upgrading" from ZPublisher to full Zope and 
> need enlightenment
> >
> > We've been using ZPublisher and PCGI since the Bobo days for
> > development, and I find myself playing with the zope.org site and
> > finally understanding more clearly what else Zope has to offer.  The
> > question now is: what is the path for us to start using Zope beyond
> > ZPublisher.
> >
> > We have a single entry point for our app, which is
> > PCGI-based.  Many of
> > the functions inside classes use DTML substitution, though we're doing
> > it from the python side.  It's not clear to me how this fits with the
> > web-managed Zope side of things.  Is there a doc describing this
> > conversion/upgrade, or are there people who can explain this to me?
> > Maybe someone who's already been through this?
>
>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?)

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__ ...

Michel, Amos, anyone -- ideas for what's going wrong, or what else I need 
to do?  (Error output below.)

TIA,
Michael
---------

Debugging Notice

          Zope has encountered a problem publishing your object.

          Cannot locate object at: http://localhost:9673/Zope/sess/Z8Q

Traceback (innermost last):
   File 
/home/httpd/zope/Zope-2.0.1-linux2-x86/lib/python/ZPublisher/Publish.py, 
line 214, in publish_module
   File 
/home/httpd/zope/Zope-2.0.1-linux2-x86/lib/python/ZPublisher/Publish.py, 
line 179, in publish
   File /home/httpd/zope/Zope-2.0.1-linux2-x86/lib/python/Zope/__init__.py, 
line 201, in zpublisher_exception_hook
     (Object: ElementWithAttributes)
   File 
/home/httpd/zope/Zope-2.0.1-linux2-x86/lib/python/ZPublisher/Publish.py, 
line 151, in publish
   File 
/home/httpd/zope/Zope-2.0.1-linux2-x86/lib/python/ZPublisher/BaseRequest.py, 
  line 334, in traverse
   File 
/home/httpd/zope/Zope-2.0.1-linux2-x86/lib/python/ZPublisher/HTTPResponse.py 
, line 520, in debugError
NotFound: (see above)



. . . . .
Michael Olivier
Local2Me.com, Inc.
(650) 961-1357
(650) 292-2227 fax