aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKaran Jayachandra <mail@karanjayachandra.com>2024-10-25 18:24:13 +0200
committerKaran Jayachandra <mail@karanjayachandra.com>2024-10-25 18:24:13 +0200
commit2a390e99e03fe538169aa6d7c23669eaa5ece467 (patch)
tree211a184bfc362fbc3f7186789eb65391b7f1fb87 /src
parent70b7b2d950b62939034eaa34c605beb8159edd51 (diff)
Added the requirements on the static files
Diffstat (limited to 'src')
-rw-r--r--src/match_up/__init__.py (renamed from src/match_up/app.py)7
-rw-r--r--src/match_up/controller.py4
2 files changed, 7 insertions, 4 deletions
diff --git a/src/match_up/app.py b/src/match_up/__init__.py
index cb790f3..badf3f0 100644
--- a/src/match_up/app.py
+++ b/src/match_up/__init__.py
@@ -1,6 +1,6 @@
from dotenv import load_dotenv
-from controller import RoundGenerator
-from model import CourtList, PlayerList
+from match_up.controller import RoundGenerator
+from match_up.model import CourtList, PlayerList
from jinja2 import FileSystemLoader, Environment
from flask import Flask, render_template, request
@@ -88,3 +88,6 @@ def toggle_court(court_number):
@app.route("/courts", methods=["GET"])
def get_list_of_courts():
return render_template("courts.j2", courts=rg.courts.get_courts())
+
+def main():
+ app.run()
diff --git a/src/match_up/controller.py b/src/match_up/controller.py
index e6dc827..2f8bfaf 100644
--- a/src/match_up/controller.py
+++ b/src/match_up/controller.py
@@ -1,8 +1,8 @@
from typing import Tuple
from operator import attrgetter
from dataclasses import dataclass
-from utilities import sample_list, Timer
-from model import Team, Game, PlayerList, CourtList, MAX_LEVEL, PLAYER_PER_COURT
+from match_up.utilities import sample_list, Timer
+from match_up.model import Team, Game, PlayerList, CourtList, MAX_LEVEL, PLAYER_PER_COURT
def _create_placeholders(courts: dict, name: str) -> list[Game]: