Add moderation tool to Trombi

This commit is contained in:
Skia
2017-05-12 18:30:06 +02:00
parent adeda41b52
commit 231cb236dc
9 changed files with 234 additions and 46 deletions

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: