Logo Search packages:      
Sourcecode: zope-coreblog version File versions

def zope-coreblog-1.0::Entry::Entry::deleteComment (   self,
  id 
)

Delete a comment 

Definition at line 629 of file Entry.py.

00629                               :
        """ Delete a comment """
        if not id in self.comments:
            raise KeyError,"Comment(ID:%d) does not exists."
        self.comments.remove(id)
        self.moderated_comment_count = self.moderated_comment_count - 1
        if self.moderated_comment_count < 0:
            self.moderated_comment_count = 0
        self.aq_parent.deleteComment(id)
        #recatalog...
        self.index()


    security.declareProtected(ManageCOREBlog, 'moderateComments')


Generated by  Doxygen 1.6.0   Back to index