Running apps with Zope 2?

Peter K. kanzow at gmd.de
Mon Nov 29 18:10:29 CET 1999


"Peter K." wrote:

> Hello,
>
> I have written some web applications using the old Zope/Bobo version. This is what I
> want! But what must I do to achieve this in Zope 2?

I have found a first hint, but it doesn't work right.

I added an External Method "Bind" to a folder (e.g. called "Test"):

class object:
    "object"
    def index_html(self):
        "index"
        return "Index World"
    def hello(self):
        "hello"
        return "Hello, World"

def Bind(self):
    "bind"
    self.the_object=object()
    return "Bound"

After executing Bind (e.g. by accessing http://server.domain.de/Test/Bind) I can
access the object with http://server.domain.de/Test/the_object (giving "Index World")
and http://server.domain.de/Test/the_object/hello (giving "Hello, World"). Even nested
objects work.

But after shutting down the Zope Server and restarting it, access to the entire "Test"
folder is denied with the error "Missing doc string for Test". Neither "Test" is
accessible in the Management screen. I have to use the management screen to Undo the
"Bind" invocation of the "Test" folder, and "Test" is accessible again. This is
impractical, so I think I have chosen the wrong method to glue objects into the Zope
hierarchy. Anyone with better ideas?

Thanks, Peter







More information about the Python-list mailing list