[Zope] ObjectManager and product instantiation

Max M maxm@mxm.dk
Wed, 03 Jul 2002 13:24:08 +0200


Max M wrote:

> If it is a Python based product you can just import the product in the 
> normal fashion and then instanciate it. Ie. from an external script.
>
> from NiceProduct import NiceProduct
>
> id = 'niceId'
> niceProduct = NiceProduct(id)
> niceProduct.title = 'Nice Title'
> self.someFolder._setObject(id, theClass(niceProduct))


Whoops ... wrong code in the last line::

    self.someFolder._setObject(id, niceProduct)

regards Max M

 

"Sorry I would Really Like To Help More On This Project,
But Am To Busy Doing Paid Work On A Tight Deadline"
    Max M