[Zope] how to know if an object is an objectmanager
Casey Duncan
cduncan@kaivo.com
Thu, 03 May 2001 08:30:13 -0600
Jerome Alet wrote:
>
> Hi,
>
> I'm writing something generic in a python script which has to test if an
> object is an objectmanager or not, since I want it to work with Folders
> but also with user defined types which inherit from objectmanager.
>
> How can I do that ?
>
> thanks.
>
Folderish objects (based on ObhectManager) have an attribute,
isPrincipiaFolderish. Just test for this property as in:
if getattr(ob, 'isPrincipiaFolderish', 0):
or
<dtml-if name="isPrincipiaFolderish">
hth
--
| Casey Duncan
| Kaivo, Inc.
| cduncan@kaivo.com
`------------------>