[Zope] adding product-based objects programmatically

Dieter Maurer dieter at handshake.de
Thu Aug 3 13:04:47 EDT 2006


Kees de Brabander wrote at 2006-8-3 16:25 +0200:
>Huh? I included the relevant portions of my source code in my message:
>
>Module QuerySet.py:
>from Query import manage_addQuery
>class QuerySet(Folder):
>    def __init__(self, id, title):
>        self.id = id
>        self.title = title
>        self.manage_addUserFolder()
>
>    def manage_afterAdd(self, item, container):
>        manage_addQuery(self, id, title)
>
>manage_addQuery in Query.py looks like:
>def manage_addQuery(dispatcher, id, title, REQUEST=None):
>    "...."
>    nQ=Query(id,title)
>    dispatcher.Destination()._setObject(id, nQ)

Apparently, "dispatcher" lacks a "Destination" method.

Why are you using it?
Usually "dispatcher._setObject" is enough.



-- 
Dieter


More information about the Zope mailing list