def METHOD_NAME(request):
    teams = [
        {'name': team.name, 'members': team_members_names(request, team)}
        for team in Team.objects.filter(contest=request.contest)
    ]
    return TemplateResponse(request, 'teams/teams.html', {'teams': teams})