loadsite : how to detect object or attribute exist?
I want to modify loadsite to upload some database data to zope. However, I would like to detect the existing of the existing DTMLDocument and its attribute to prevent conflicts. How could I do that? Rgs, Kent Sin --------------------------------- kentsin.weblogs.com kentsin.imeme.net
On Thu, 21 Jun 2001, Sin Hang Kin wrote:
I want to modify loadsite to upload some database data to zope. However, I would like to detect the existing of the existing DTMLDocument and its attribute to prevent conflicts.
To test if an object (actually, its ID) is in the folder, ask the list of IDs: if "my_id" in folder.objectIds():... To test a property use object.hasProperty("p_id") Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
participants (2)
-
Oleg Broytmann -
Sin Hang Kin