def review_comment():
    commid = request.json['commid']
    review = request.json['review']
    user = User.current()
    if not user.anonymous:
        Comment.approve(commid, review, user)
    return jsonify(success=True)
Beispiel #2
0
 def test_comment_approved(self):
     post = Post(author=self.me, title="Hi", created_date=timezone.now())
     post.save()
     comment = Comment(author=self.me.username, post=post)
     comment.approve()
     comment.save()
     assert comment in post.approved_comments()