Beispiel #1
0
def team_page(request, pro_team_id):
    """ Populate the base team vars template with team data that matches
    	the requested pro_team_id
    """
    team = player_models.Pro_Team.objects.get(short=pro_team_id)
    user = request.user
    schedule = logic.getteamschedule(pro_team_id)
    players = player_models.Player.objects.filter(pro_team=pro_team_id)
    plist = list(players)
    curweek = logic.getweek()
    try:
        nextopponent = logic.getproteamopponent(pro_team_id, curweek)
    except player_models.Pro_Team.DoesNotExist:
        pass
    return default_response(locals(), request, 'base_playerpage_vars.html')