How to display the owner of an object?
Hi all, I know that this has been a topic on this list before, but what I found in the archives didn't really bring me any further. All I want to do ist to display the owner of an object. Is there a way to do this easily? Basically what I want to do is something like this: <dtml-in "Catalog(sort_on='sort_date', sort_order='reverse')"> <dtml-var id_or_title> <dtml-var owner> # Is there something like this?? </dtm-in> Is there a predefined variable for the owner of the object? Thanks a lot, Jan Jan@Mountainbikehq.de http://www.MountainbikeHQ.de - Your home for DH, DS and CC Mountainbiking
On Fri, 21 Sep 2001, Jan Lentfer wrote:
I know that this has been a topic on this list before, but what I found in the archives didn't really bring me any further. All I want to do ist to display the owner of an object. Is there a way to do this easily?
--- 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 --- hth. Jerome Alet
participants (2)
-
Jan Lentfer -
Jerome Alet