Grrr.... That works fine. But it annoys me I cant use a standard function to
that. I like to use a standard function and use the checking that someone
old_id = obj.id()
new_id = ASPNTools.safetymunge(obj.id())
self = obj.aq_parent
ob = obj
if hasattr(ob, 'aq_base'):
self._setObject(new_id, ob, set_owner=0)
Thanks Shane... phew no Perl necessary.
----- Original Message -----
From: "Shane Hathaway" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 28, 2000 8:26 PM
Subject: Re: [Zope-dev] why cant i rename an object from an external method
> Andy McKay wrote:
> > Heres a treat. I'm trying to write an external method to rename objects.
> > have approx 10,000 to rename so a script would be nice. No problem I
> > thought, imitate a forms manage_renameObject and CopySupport.py can do
> > work.
> > Rename works fine from the web form, but not from a script.
> > (ASPNTools.getsomeobjectsfromstring returns a bunch of objects, Ive
> > replicating this with resolve_url and get different namespace error,
> > this be a clue?).
> I would try using _delObject and _setObject instead.
> manage_renameObject() does some security checks that don't apply in your
> Zope-Dev maillist - [EMAIL PROTECTED]
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope )
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -