Add season statistics switching
This commit is contained in:
19
formula10.py
19
formula10.py
@ -18,6 +18,25 @@ def index():
|
||||
return render_template("index.jinja")
|
||||
|
||||
|
||||
@app.route("/seasons/")
|
||||
def default_season():
|
||||
return redirect("/seasons/2023/p10")
|
||||
|
||||
|
||||
@app.route("/seasons/<year>/")
|
||||
def default_statistic(year):
|
||||
return redirect("/seasons/" + year + "/p10")
|
||||
|
||||
|
||||
@app.route("/seasons/<year>/<statistic>/")
|
||||
def seasons(year, statistic):
|
||||
seasons = Season.query.all()
|
||||
|
||||
return render_template(
|
||||
"season.jinja", year=year, statistic=statistic, seasons=seasons
|
||||
)
|
||||
|
||||
|
||||
# @app.route("/teams", methods=["GET", "POST"])
|
||||
# def teams():
|
||||
# if request.method == "POST":
|
||||
|
||||
Reference in New Issue
Block a user