[Zope] Set _allowed_meta_types on folder instances without creating a new product?
Jeff Kowalczyk
jtk@adelphia.net
Wed, 1 May 2002 01:09:20 -0400
> Make an External Method. Call it on the folder and
> give it as parameter the meta types your want to allow.
I've created changeAllowedMetaTypes.py and installed it as an External
method.
from string import join
def changeAllowedMetaTypes(self, mts):
"""set _allowed_meta_types to mts"""
self._allowed_meta_types = tuple(mts)
self._p_changed = 1
return '_allowed_meta_types changed to ' +
join(self._allowed_meta_types) + ' on ' + self.id
I'm calling it like
http://localhost:8080/myFolder/Images/changeAllowedMetaTypes?mts:list=Im
age&mts:list=Folder
And it's returning '_allowed_meta_types changed to Image Folder on
Images', so the call seems to be succeeding. However, the folder Images
still shows the full metatype list when I return to it. Am I missing
something?