X-Git-Url: https://git.sommitrealweird.co.uk/sommitrealweird.git/blobdiff_plain/64484656099dfff360742f3a2c1e4d07bc1f6bd8..7b250882b48932b7fc6a68575273c3fcbfcef97f:/sommitrealweird/blog/models.py?ds=sidebyside diff --git a/sommitrealweird/blog/models.py b/sommitrealweird/blog/models.py index c98407d..fa2e954 100644 --- a/sommitrealweird/blog/models.py +++ b/sommitrealweird/blog/models.py @@ -10,7 +10,7 @@ FORMAT_CHOICES = ( 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() @@ -33,7 +33,10 @@ class BlogEntryCommentModerator(CommentModerator): 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)