julian wrote at 2007-5-30 18:00 +0200:
> ...
>I have made some python scripts to export data of some zope2.7 products 
>in text file, and I have made some scripts to import theses data to 
>rebuild products in zope2.9. Theses scripts run very well.
>But my problem is that all product that is rebuilt are in 
>I want rebuil all product in zope2.9 in the same directory as zope 2.7. 
>I have the same structure for zope 2.7 and zope 2.9.
>My Import script
>              id = self.generateUniqueId('J_product')
>              self.invokeFactory('J_product', id)

This "self" controls where the new object is created.

More precisely: "obj.invokeFactory" will create the new object
in "obj" (provided "obj" has a method "invokeFactory", if not
"invokeFactory" may be acquired and the new object created in the
object, "invokeFactory" was acquired from).

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to