class BlogEntry(models.Model):
title = models.CharField(max_length=150)
- islive = models.BooleanField()
+ islive = models.BooleanField(default=False)
sections = models.ManyToManyField('BlogSection')
format = models.CharField(max_length=10, choices=FORMAT_CHOICES)
slug = models.SlugField()
email_notification = True
def moderate(self, comment, content_object, request):
- return True
+ if request.user.is_authenticated():
+ return False
+ else:
+ return True
moderator.register(BlogEntry, BlogEntryCommentModerator)