[Zope] How to get the owner of an object from DTML ?

Jerome Alet alet@unice.fr
Wed, 4 Jul 2001 20:07:44 +0200


On Wed, Jul 04, 2001 at 08:03:09PM +0200, Gilles Lenfant wrote:
> Thanks...

here's the python code from ZShell (http://cortex.unice.fr/~jerome/ZShell/), 
untested from DTML or Python Script:

--- CUT ---
ownerinfo = object.owner_info()
if (ownerinfo is not None) :
	if hasattr(ownerinfo, "has_key") and ownerinfo.has_key('id') : 
		owner = ownerinfo['id']
        else :
                # at least for /Control_Panel/Products[/*]
                owner = repr(ownerinfo)
else :
        owner = 'Not owned'
--- CUT ---

hoping this helps.


bye,

Jerome Alet