add 404
This commit is contained in:
12
allfence.py
12
allfence.py
@@ -223,6 +223,18 @@ class Tournaments:
|
|||||||
db.commit()
|
db.commit()
|
||||||
return True
|
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
|
@staticmethod
|
||||||
def add_event_results(db, event_id, results):
|
def add_event_results(db, event_id, results):
|
||||||
pass
|
pass
|
||||||
9
templates/404.html
Normal file
9
templates/404.html
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>404 - Page not Found</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p>We couldn't find what you were looking for D:</p>
|
||||||
|
<a href="{{ url_for('index', _external=True) }}">Return home</a>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -1,21 +1,21 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Event - {{ title }}</title>
|
<title>Event - {{ title }}</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>{{ title }}</h1>
|
<h1>{{ title }}</h1>
|
||||||
<p>{{ time }}</p>
|
<p>{{ time }}</p>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th>User</th>
|
<th>User</th>
|
||||||
</tr>
|
</tr>
|
||||||
{% for user_id, user_name in users %}
|
{% for user_id, user_name in users %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="{{ url_for('users', user_id=user_id, _external=True) }}">{{ user_name }}</a></td>
|
<td><a href="{{ url_for('users', user_id=user_id, _external=True) }}">{{ user_name }}</a></td>
|
||||||
<td>{{ event_date }}</td>
|
<td>{{ event_date }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user