add 404
This commit is contained in:
12
allfence.py
12
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
|
||||
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>
|
||||
<html>
|
||||
<head>
|
||||
<title>Event - {{ title }}</title>
|
||||
<title>Event - {{ title }}</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>{{ title }}</h1>
|
||||
<p>{{ time }}</p>
|
||||
<table>
|
||||
<tr>
|
||||
<th>User</th>
|
||||
</tr>
|
||||
{% for user_id, user_name in users %}
|
||||
<tr>
|
||||
<td><a href="{{ url_for('users', user_id=user_id, _external=True) }}">{{ user_name }}</a></td>
|
||||
<td>{{ event_date }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<h1>{{ title }}</h1>
|
||||
<p>{{ time }}</p>
|
||||
<table>
|
||||
<tr>
|
||||
<th>User</th>
|
||||
</tr>
|
||||
{% for user_id, user_name in users %}
|
||||
<tr>
|
||||
<td><a href="{{ url_for('users', user_id=user_id, _external=True) }}">{{ user_name }}</a></td>
|
||||
<td>{{ event_date }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user