예제 #1
0
파일: views.py 프로젝트: longzenvo/pactf
def team_public_detail(request, *, team_id):
    """View the given team's data."""

    try:
        other_team = models.Team.objects.get(id=team_id)
    except models.Team.DoesNotExist:
        raise Http404()

    context = {
        'windows': queries.all_windows().reverse(),
        'other_team': other_team,
        'total_score': queries.score(team=other_team, window=None)
    }
    return render(request, 'ctflex/misc/team.html', context)
예제 #2
0
파일: views.py 프로젝트: milesmcc/pactf
def team_public_detail(request, *, team_id):
    """View the given team's data."""

    try:
        other_team = models.Team.objects.get(id=team_id)
    except models.Team.DoesNotExist:
        raise Http404()

    context = {
        'windows': queries.all_windows().reverse(),
        'other_team': other_team,
        'total_score': queries.score(team=other_team, window=None),
        'score_normalization': settings.SCORE_NORMALIZATION,
    }
    return render(request, 'ctflex/misc/team.html', context)
예제 #3
0
파일: admin.py 프로젝트: PACTF/pactf
 def score(self, team):
     return queries.score(team=team, window=None)
예제 #4
0
파일: ctflex_ctf.py 프로젝트: PACTF/pactf
def score(context, team):
    window = context.get('window', queries.get_window())
    return queries.score(team=team, window=window)
예제 #5
0
def score(context, team):
    window = context.get('window', queries.get_window())
    return queries.score(team=team, window=window)
예제 #6
0
 def score(self, team):
     return queries.score(team=team, window=None)