예제 #1
0
파일: views.py 프로젝트: PhobosXIII/qc
def tables_quest_all(request, quest_id):
    quest = get_object_or_404(Quest, pk=quest_id, type=Quest.LINEAR, parent__isnull=True)
    request = is_quest_organizer_or_agent(request, quest)
    players = quest.players()
    missions = quest.missions().exclude(is_finish=True)
    keylogs = Keylog.right_keylogs(missions)
    context = {'quest': quest, 'players': players, 'missions': missions, 'keylogs': keylogs}
    return render(request, 'coordination/quests/tables/all.html', context)
예제 #2
0
파일: views.py 프로젝트: PhobosXIII/qc
def results_quest(request, quest_id):
    quest = get_object_or_404(Quest, pk=quest_id, parent__isnull=True)
    if not quest.published:
        request = is_quest_organizer(request, quest)
    context = {'quest': quest, }
    if quest.nonlinear or quest.multilinear:
        players = quest.players_ext()
        context.update({'players': players})
    else:
        missions = quest.missions().exclude(is_finish=True)
        keylogs = Keylog.right_keylogs(missions)
        current_missions = quest.current_missions()
        context.update({'missions': missions, 'keylogs': keylogs, 'current_missions': current_missions})
    return render(request, 'coordination/quests/results.html', context)