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)
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)
def score(self, team): return queries.score(team=team, window=None)
def score(context, team): window = context.get('window', queries.get_window()) return queries.score(team=team, window=window)