summaryrefslogtreecommitdiff
path: root/app.py
diff options
context:
space:
mode:
Diffstat (limited to 'app.py')
-rw-r--r--app.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/app.py b/app.py
index 87151fe..a81bde0 100644
--- a/app.py
+++ b/app.py
@@ -8,11 +8,9 @@ from flask import Flask, render_template, request
load_dotenv()
-rg = RoundGenerator(courts=CourtList(12), players=PlayerList("test_data_large.csv"))
-
-
app = Flask("Match Up! Backend")
app.config.from_object(getenv("PROD_APP_SETTINGS", "config.DevelopmentConfig"))
+rg = RoundGenerator(courts=CourtList(12), players=PlayerList("test_data_large.csv"))
@app.route("/", methods=["GET"])
@@ -28,7 +26,8 @@ def get_random_games():
@app.route("/confirm", methods=["POST"])
def confirm_games():
- return render_template("games.j2", title=f"Round: {rg.round}", games=rg.confirm())
+ games = rg.confirm()
+ return render_template("games.j2", title=f"Round: {rg.round}", games=games)
@app.route("/clear", methods=["POST"])