Re: [Zope] Function reindexObject()
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 >/SITES/plone_mySite/ >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). -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Function reindexObject()
> 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 > /SITES/plone_mySite/ > 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. But where is the problem? What are 'products' for you and what do you mean by rebuild? Where are folders like /SITES/plone_mySite/? Is this filesystem path or path in your ZODB? What are your scripts? External methods? -- Maciej Wisniowski ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Function reindexObject()
Hi, 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 /SITES/plone_mySite/ 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) mct = getattr(self, id) mct.setTitle(row[1]) mct.setJ_product_descriptif(row[2]) mct.setJ_product_web(row[3]) ## add images ## im = recup_image(mesimages,compteur,"") if im != 'no_image': mct.setJ_product_image(im) self.portal_workflow.doActionFor(mct,"publish", comment="") self.reindexObject() Thanks Julian ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )