diff --git a/allfence.py b/allfence.py index 73ca386..96de3d0 100644 --- a/allfence.py +++ b/allfence.py @@ -223,6 +223,18 @@ class Tournaments: db.commit() return True + @staticmethod + def get_tournament_details(db, tournament_id): + + with db: + with db.cursor() as curs: + curs.execute("SELECT * FROM Tournaments WHERE id = %s", (tournament_id,)) + tournament = curs.fetchall() + if not tournament: + return False, None, None, None + tournament = tournament[0] + return True, tournament[1], tournament[2], tournament[3], list(map(int, tournament[4].split())) + @staticmethod def add_event_results(db, event_id, results): pass \ No newline at end of file diff --git a/templates/404.html b/templates/404.html new file mode 100644 index 0000000..41de912 --- /dev/null +++ b/templates/404.html @@ -0,0 +1,9 @@ + + + 404 - Page not Found + + +

We couldn't find what you were looking for D:

+ Return home + + \ No newline at end of file diff --git a/templates/event.html b/templates/event.html index e9c003e..8fc2584 100644 --- a/templates/event.html +++ b/templates/event.html @@ -1,21 +1,21 @@ - Event - {{ title }} + Event - {{ title }} -

{{ title }}

-

{{ time }}

- - - - - {% for user_id, user_name in users %} - - - - - {% endfor %} -
User
{{ user_name }}{{ event_date }}
+

{{ title }}

+

{{ time }}

+ + + + + {% for user_id, user_name in users %} + + + + + {% endfor %} +
User
{{ user_name }}{{ event_date }}
\ No newline at end of file