[Zope] Programmatically creating instances of a ZClass
Gouzy Nicolas
nicolas@opixido.com
Wed, 4 Sep 2002 20:48:52 +0200
You can try:
container.manage_addProduct['MyProduct'].MyProduct_add()
MyProduct_add is the constructor of the ZClass MyProduct
Cheers,
Nicolas Gouzy
On Wednesday 04 September 2002 20:08, Borislav wrote:
> I have a Zope Product 'MyProduct' that defines a ZClass 'MyZClass'. I'd
> like to create instances of this ZClass in a python script. I couldn't
> find any info on how to do that in 'The Zope Book'. I tried something l=
ike:
>
> myObject=3DContainer.MyFolder.manage_addProduct['MyProduct'].manage_add=
MyZCla
>ss(id=3DmyId)
>
> but it didn't work.
>
> Any help will be appreciated.
>
> --Borislav
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )