From d25e2b80c4aa5ce7d75ce72409eaf15f7b4cb9c5 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Fri, 19 Jun 2009 10:04:32 +0000 Subject: [PATCH] enabled is a boolean method now instead of a property. svn path=/plone.app.discussion/trunk/; revision=27509 --- plone/app/discussion/interfaces.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plone/app/discussion/interfaces.py b/plone/app/discussion/interfaces.py index f516925..d59aa9a 100644 --- a/plone/app/discussion/interfaces.py +++ b/plone/app/discussion/interfaces.py @@ -50,12 +50,14 @@ class IConversation(IIterableMapping): (and acquisition parent) for all comments, regardless of threading. """ - enabled = schema.Bool(title=_(u"Is commenting enabled?")) - total_comments = schema.Int(title=_(u"Total number of comments on this item"), min=0, readonly=True) last_comment_date = schema.Date(title=_(u"Date of the most recent comment"), readonly=True) commentators = schema.Set(title=_(u"The set of unique commentators (usernames)"), readonly=True) + def enabled(): + """Return True if commenting enabled and False if not. + """ + def addComment(comment): """Adds a new comment to the list of comments, and returns the comment id that was assigned. The comment_id property on the comment