[Zope] PUT method & get property of parent folder
Maik Jablonski
maik.jablonski@uni-bielefeld.de
Tue, 9 Apr 2002 08:55:51 +0200
On Tue, 09 Apr 2002 00:34:04 +0200 "Marcus Schopen" <marcus@localguru.de>
wrote:
> how and where can I test in the PUT method, if a property called "TIDY"
> (boolean) is set in the parent folder the new instance of xyz will created
> in?
>
> Class xyz(DTMLDocument):
> [...]
> def PUT(self, REQUEST, RESPONSE):
> """Handle HTTP PUT requests."""
hi marcus,
maybe something like this will work (aquiring the property, this should work
for you):
if hasattr(self,'TIDY'):
ThenDoYourCleaningUp
or if you want the property of the parent folder (or aquiring up):
if hasattr(self.aq_parent,'TIDY'):
ThenDoYourCleaningUp
cu, maik.