Exemplo n.º 1
0
def playback_drawing(request, comment_id):
    comment = get_object_or_404(QuestComment, id=comment_id)

    if request.user.is_authenticated():
        Playback.append(comment=comment, viewer=request.user)

    return {'comment': comment.details()}
Exemplo n.º 2
0
    def test_reactions(self):
        cmt = create_quest_comment()

        star_models.star(create_user(), cmt)
        Playback.append(comment=cmt, viewer=create_user())

        cmt = QuestComment.objects.get(id=cmt.id)
        reactions = cmt.details().reactions
        self.assertEqual(len(reactions), 2)
Exemplo n.º 3
0
    def test_reactions(self):
        cmt = create_quest_comment()

        star_models.star(create_user(), cmt)
        Playback.append(comment=cmt, viewer=create_user())

        cmt = QuestComment.objects.get(id=cmt.id)
        reactions = cmt.details().reactions
        self.assertEqual(len(reactions), 2)
Exemplo n.º 4
0
def playback_drawing(request, comment_id):
    comment = get_object_or_404(QuestComment, id=comment_id)

    if request.user.is_authenticated():
        Playback.append(comment=comment, viewer=request.user)

    comment_details = comment.details()
    add_viewer_has_starred_field([comment_details], viewer=request.user)

    return {'comment': comment_details}