Ejemplo n.º 1
0
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)
Ejemplo n.º 2
0
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)
Ejemplo n.º 3
0
Archivo: admin.py Proyecto: PACTF/pactf
 def score(self, team):
     return queries.score(team=team, window=None)
Ejemplo n.º 4
0
def score(context, team):
    window = context.get('window', queries.get_window())
    return queries.score(team=team, window=window)
Ejemplo n.º 5
0
def score(context, team):
    window = context.get('window', queries.get_window())
    return queries.score(team=team, window=window)
Ejemplo n.º 6
0
 def score(self, team):
     return queries.score(team=team, window=None)