[Product-Developers] Re: manage_afterPUT for ATFolder
MTakahashi at oid.ucla.edu
Tue Mar 11 15:11:07 UTC 2008
> > I'm trying to set the title of a folder to its id when a new folder
> > created via FTP. Currently, when a new folder is created the title
> > not set.
> >>From what I have read, "ATFolder implementation does not provide its
> > PUT factory (or manage_afterPUT() implementation)." Therefore, I
> > I could simply define one within my content type, but this does not
> > to work.
> meaning what?
Therefore my thought was that it may not be possible to set the title.
> > def manage_afterPUT(self, data, marshall_data, file, context,
> > filename, REQUEST, RESPONSE):
> > """After webdav/ftp PUT method
> > Set title according to the id on webdav/ftp PUTs.
> > """
> > id = self.getId()
> > self.setTitle(id)
> at the very least I'd call the parent's class PUT factory
> as well. And don't be fooled by ATFolder not providing one.
> It simply doesn't change the one it inherits.
I've also tried that as well with no luck:
def PUT_factory( self, name, typ, body ):
id = self.getId()
For some reason, the setTitle() function does not work on ATFolders.
More information about the Product-Developers