Example #1
0
def blog_comments(uuid):
    tweets = Comment.get_comments_json(gallery_uuid=uuid, sort_by="-created_at")
    data = {"comments": tweets, "num_comments": len(tweets)}
    return json.dumps(data), 200, {"Content-Type": "application/json"}
Example #2
0
def blog_comments(uuid):
    tweets = Comment.get_comments_json(gallery_uuid=uuid,
                                       sort_by='-created_at')
    data = {'comments': tweets, 'num_comments': len(tweets)}
    return json.dumps(data), 200, {'Content-Type': 'application/json'}