[Zope] Re: Function reindexObject()

Maciej Wisniowski maciej.wisniowski at coig.katowice.pl
Thu May 31 07:29:50 EDT 2007


> The import script run very well, I transform each line of the text
> file to a correspondant product as zope2.7. But I want put each new
> product in the same repertory as zope 2.7. So how say to each product
> in my import script where it must be copy.
Why don't you just export object path along
with it's data? use |getPhysicalPath() for example.
Take a look at http://plope.com/Books/2_7Edition/AppendixB.stx#2-396 for
description.
Also consider use of restrictedTraverse to get access to object that you
will
add newly created objects to (during import).

Sth like:
container = self.|restrictedTraverse('/SITES/plone_mySite/repertory1/")
container.invokeFactory....

Or something like that.
> My subject is reindexObject because I think it's this function that
> put the new Object (product) in ZMI. I don't know :s
AFAIK reindexObject is used to reindex object in Catalog.
invokeFactory puts new object of the specific type to ZMI.

-- 
Maciej Wisniowski


More information about the Zope mailing list