def close_for_comments(self): """ Disable(close) comments. """ NyContainer.close_for_comments(self) for photo in self.getObjects(): photo.close_for_comments()
def open_for_comments(self): """ Enable(open) comments. """ NyContainer.open_for_comments(self) for photo in self.getObjects(): photo.open_for_comments()
def __init__(self, id, contributor): self.id = id #self.approved = approved #self.approved_by = approved_by NyContainer.__init__(self) NyContentData.__init__(self) #self.save_properties(title, lang, **kwargs) self.contributor = contributor
def __init__(self, id, contributor): self.id = id # self.approved = approved # self.approved_by = approved_by NyContainer.__init__(self) NyContentData.__init__(self) # self.save_properties(title, lang, **kwargs) self.contributor = contributor
def manage_addFile(self, id, file="", **kwargs): # if self.is_ext: # return manage_addExtFile(self, id=id, file=file) if self.is_blobfile: if isinstance(file, basestring): if not bool(id): raise ValueError, "Please specify id of file passed as string" f = StringIO() f.write(file) f.seek(0) f.filename = id file = f if not bool(id): # TODO: make sure of proper id id = file.filename blobfile = make_blobfile(file) self._setObject(id, blobfile, set_owner=0) blobfile.id = id return blobfile.getId() else: return NyContainer.manage_addFile(self, id, file)
def manage_addFile(self, id, file="", **kwargs): if self.is_ext: return manage_addExtFile(self, id=id, file=file) return NyContainer.manage_addFile(self, id, file)
def __init__(self): NyContainer.__init__(self)
def __init__(self, id, contributor): self.id = id self.contributor = contributor self.displays = DEFAULT_DISPLAYS.copy() NyContainer.__init__(self) NyContentData.__init__(self)