26 Apr
2002
26 Apr
'02
8:25 p.m.
Jeff Kowalczyk writes:
Is there a way to set the class attribute sometimes used in products
class myProduct(...): _allowed_meta_types = ('Image','File')
On a regular folder instance, without creating a plethora of specialized folder classes? Yes.
Make an External Method. Call it on the folder and give it as parameter the meta types your want to allow. The External Method will look like: def changeAllowedMetaTypes(self,mts): '''set '_allowed_meta_types' to *mts*.''' self._allowed_meta_types= tuple(mts) return '_allowed_meta_types changed' You call it like URL_TO_YOUR_FOLDER/changeAllowedMetaTypes?mts:list=Image&mts:list=File Dieter