def input_player(id): league = league_repo.select(id) teams = league_repo.teams(league) return render_template("new_leagues/add_players.html", title="Create New League", league=league, teams=teams, creating=True)
def league_results(id): league = league_repo.select(id) teams = league_repo.teams(league) games = league_repo.results(league) return render_template("leagues/results.html", title=league.sport + " - " + league.name, league=league, teams=teams, games=games)
def show_league(id): league = league_repo.select(id) teams = league_repo.teams(league) top_scorer = league_repo.top_scorer(league) return render_template("leagues/show.html", title=league.sport + " - " + league.name, league=league, teams=teams, top_scorer=top_scorer)
def league_fixtures_by_round(id, round_no): league = league_repo.select(id) teams = league_repo.teams(league) current_round = int(round_no) max_round = league_repo.get_max_round(league) if current_round is not None: games = league_repo.current_games(league, current_round) else: games = [] return render_template("leagues/current_round.html", title=league.sport + " - " + league.name, league=league, teams=teams, games=games, round_no=current_round, max_round=max_round)