[Zope] Re: copy item from on ObjectManager to another?
Josef Meile
jmeile at hotmail.com
Sat Aug 28 15:03:05 EDT 2004
Josef Meile wrote:
> --- In zope at yahoogroups.com, John Hunter <jdhunter at a...> wrote:
> > >>>>> "Jonathan" == Jonathan Hobbs <toolkit at m...> writes:
> >
> > Jonathan> do a google on 'manage_copyObjects'
> >
> >
> > Thanks - I'm not sure this method is appropriate though. I'm using
> > the python API (eg in a product) and I've found this about
> manage_copyObjects
> >
> > The argument to manage_copyObjects is a tuple of object IDs which
> > must exist in the folder where you call the method.
> >
> > and I can't work with this constraint, eg I'm not calling the method
> > from the folder containing the objects.
> Then get the container object with:
>
> myObj=self.restrictedTraverse(path)
> if myObj==None:
> #The object wasn't found
> #Raise an exception or return an error here
> else:
> #The object was found
> #Copy objects here
Ops, I forgot, you have to pass "None" as the default value:
myObj=self.restrictedTraverse(path,None)
More information about the Zope
mailing list