]> git.sommitrealweird.co.uk Git - sommitrealweird.git/blobdiff - sommitrealweird/blog/models.py
Make photo albums work
[sommitrealweird.git] / sommitrealweird / blog / models.py
index c98407ded0d508709e9b7c58b1716ea072e4e706..fa2e954f49e8319a031b93a3ea5174c758eab730 100644 (file)
@@ -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)