diff options
Diffstat (limited to 'app.py')
| -rw-r--r-- | app.py | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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"]) |
