Add moderation tool to Trombi

This commit is contained in:
Skia committed 2017-05-12 18:42:52 +02:00
1 parent adeda41b52
commit 231cb236dc
9 files changed
+234 -46

No files matched your search

+1
View File
@@ -106,6 +106,7 @@ class TrombiComment(models.Model):
author = models.ForeignKey(TrombiUser, verbose_name=_("author"), related_name='given_comments')
target = models.ForeignKey(TrombiUser, verbose_name=_("target"), related_name='received_comments')
content = models.TextField(_("content"), default="")
is_moderated = models.BooleanField(_("is the comment moderated"), default=False)
def can_be_viewed_by(self, user):
if user.id == self.target.user.id: