コード例 #1
0
def quest_gallery(request, quest_id, offset='top', direction='next', include_reactions=True):
    quest = get_object_or_404(Quest, id=quest_id)
    comments, pagination = models.gallery_comments(quest, offset=offset, direction=direction, viewer=request.user, include_reactions=include_reactions)

    return {
        'comments': comments,
        'pagination': pagination,
        'quest': quest.details(),
    }
コード例 #2
0
def quest_gallery_for_comment(request, comment_id, include_reactions=True):
    comment = get_object_or_404(QuestComment, id=comment_id)

    try:
        quest = Quest.objects.get(id=comment.parent_comment_id)
    except Quest.DoesNotExist:
        raise Http404()

    comments, pagination = models.gallery_comments(quest, force_comment=comment, viewer=request.user, include_reactions=include_reactions)

    return {
        'comments': comments,
        'pagination': pagination,
        'quest': quest.details(),
    }
コード例 #3
0
def quest_gallery(request,
                  quest_id,
                  offset='top',
                  direction='next',
                  include_reactions=True):
    quest = get_object_or_404(Quest, id=quest_id)
    comments, pagination = models.gallery_comments(
        quest,
        offset=offset,
        direction=direction,
        viewer=request.user,
        include_reactions=include_reactions)

    return {
        'comments': comments,
        'pagination': pagination,
        'quest': quest.details(),
    }
コード例 #4
0
def quest_gallery_for_comment(request, comment_id, include_reactions=True):
    comment = get_object_or_404(QuestComment, id=comment_id)

    try:
        quest = Quest.objects.get(id=comment.parent_comment_id)
    except Quest.DoesNotExist:
        raise Http404()

    comments, pagination = models.gallery_comments(
        quest,
        force_comment=comment,
        viewer=request.user,
        include_reactions=include_reactions)

    return {
        'comments': comments,
        'pagination': pagination,
        'quest': quest.details(),
    }