Hi Dieter, Dieter Maurer 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.""" self.dav__init(REQUEST, RESPONSE) self.dav__simpleifhandler(REQUEST, RESPONSE, refresh=1) body=REQUEST.get('BODY', '') self._validateProxy(REQUEST) self.munge(body) self.ZCacheable_invalidate() RESPONSE.setStatus(204) return RESPONSE You use "getProperty" to check for a property of an object (--> Zope online help -> Zope Help -> API reference -> Object manager).
You use method "aq_parent" (or "aq_inner" followed by "aq_parent") to access the parent.
To understand, where you are, and how many "aq_parent" you need to use, you can use Shane's "showaq" method (--> list archives).
it's more than mysterious calling "showaq(self, ' html ')" from "manage_addHTMLDocument" (creating an instance via Zope's Managment Interface) says: HTMLDocument | <ProductDispatcher instance at 8102880> | HTMLFolder | Zope | <RequestContainer instance at 886b2f8> Uploading a file via FTP and calling "showaq(self, ' html ')" from PUT method says NOTHING !!! Why? Bye Marcus