コード例 #1
0
def update_team(id):
    team_name = request.form["team_name"]
    location = request.form["location"]
    stadium_name = request.form["stadium_name"]
    stadium_capacity = request.form["stadium_capacity"]
    fixtures_played = request.form["fixtures_played"]
    fixtures_won = request.form["fixtures_won"]
    fixtures_drawn = request.form["fixtures_drawn"]
    fixtures_lost = request.form["fixtures_lost"]
    points = request.form["points"]
    score = request.form["score"]

    team = Team(team_name, location, stadium_name, stadium_capacity,
                fixtures_played, fixtures_won, fixtures_drawn, fixtures_lost,
                points, score, id)
    team_repository.update(team)
    return redirect("/clubs")
コード例 #2
0
def update_team(id):
    name = request.form["name"]
    sponsor = request.form["sponsor"]
    team = Team(name, sponsor, id)
    team_repository.update(team)
    return redirect("/teams")
コード例 #3
0
def update_team(id):
    name = request.form["name"]
    team = Team(name, id)
    team_repository.update(team)
    return redirect('/teams')
コード例 #4
0
def update_team(id):
    team_name = request.form['team_name']

    team = Team(team_name, id)  # wins
    team_repository.update(team)
    return redirect("/teams")
コード例 #5
0
def update(id):
    name = request.form['name']
    points = request.form['points']
    updated_team = Team(name, points, id)
    team_repository.update(updated_team)
    return redirect("/teams")
コード例 #6
0
def update_team(id):
    team_name = request.form['team_name']
    league_id = 1
    team = Team(team_name, league_id, id)
    team_repository.update(team)
    return redirect('/teams')