Compare commits

..

2 Commits

Author SHA1 Message Date
2a0b3bc3f3 Display race time
All checks were successful
Build Formula10 Docker Image / build-docker (push) Successful in 14s
2024-02-26 17:06:51 +01:00
dbbbd5ccc6 Add times to static race data 2024-02-26 17:06:35 +01:00
4 changed files with 33 additions and 29 deletions

View File

@ -1,25 +1,25 @@
name,number,date,pxx
Bahrain,1,2024-03-02,4
Saudi Arabia,2,2024-03-09,17
Australia,3,2024-03-24,5
Japan,4,2024-04-07,11
China,5,2024-04-21,15
Miami,6,2024-05-05,6
Emilia-Romagna,7,2024-05-21,19
Monaco,8,2024-05-26,9
Canada,9,2023-06-09,11
Spain,10,2024-06-23,13
Austria,11,2024-06-30,12
Great Britain,12,2024-07-07,17
Hungary,12,2023-07-23,12
Belgium,13,2024-07-28,13
Netherlands,14,2024-08-25,4
Monza,15,2024-09-01,6
Azerbaijan,16,2024-09-15,10
Singapore,17,2024-09-22,6
Austin,18,2024-10-20,11
Mexico,19,2024-10-27,17
Brazil,20,2024-11-03,14
Las Vegas,21,2024-11-23,8
Qatar,22,2024-12-01,4
Abu Dhabi,23,2024-12-08,5
Bahrain,1,2024-03-02-16-00,4
Saudi Arabia,2,2024-03-09-18-00,17
Australia,3,2024-03-24-05-00,5
Japan,4,2024-04-07-07-00,11
China,5,2024-04-21-09-00,15
Miami,6,2024-05-05-22-00,6
Emilia-Romagna,7,2024-05-21-15-00,19
Monaco,8,2024-05-26-15-00,9
Canada,9,2023-06-09-20-00,11
Spain,10,2024-06-23-15-00,13
Austria,11,2024-06-30-15-00,12
Great Britain,12,2024-07-07-16-00,17
Hungary,12,2023-07-23-15-00,12
Belgium,13,2024-07-28-15-00,13
Netherlands,14,2024-08-25-15-00,4
Monza,15,2024-09-01-15-00,6
Azerbaijan,16,2024-09-15-13-00,10
Singapore,17,2024-09-22-14-00,6
Austin,18,2024-10-20-21-00,11
Mexico,19,2024-10-27-21-00,17
Brazil,20,2024-11-03-18-00,14
Las Vegas,21,2024-11-23-07-00,8
Qatar,22,2024-12-01-18-00,4
Abu Dhabi,23,2024-12-08-14-00,5
1 name number date pxx
2 Bahrain 1 2024-03-02 2024-03-02-16-00 4
3 Saudi Arabia 2 2024-03-09 2024-03-09-18-00 17
4 Australia 3 2024-03-24 2024-03-24-05-00 5
5 Japan 4 2024-04-07 2024-04-07-07-00 11
6 China 5 2024-04-21 2024-04-21-09-00 15
7 Miami 6 2024-05-05 2024-05-05-22-00 6
8 Emilia-Romagna 7 2024-05-21 2024-05-21-15-00 19
9 Monaco 8 2024-05-26 2024-05-26-15-00 9
10 Canada 9 2023-06-09 2023-06-09-20-00 11
11 Spain 10 2024-06-23 2024-06-23-15-00 13
12 Austria 11 2024-06-30 2024-06-30-15-00 12
13 Great Britain 12 2024-07-07 2024-07-07-16-00 17
14 Hungary 12 2023-07-23 2023-07-23-15-00 12
15 Belgium 13 2024-07-28 2024-07-28-15-00 13
16 Netherlands 14 2024-08-25 2024-08-25-15-00 4
17 Monza 15 2024-09-01 2024-09-01-15-00 6
18 Azerbaijan 16 2024-09-15 2024-09-15-13-00 10
19 Singapore 17 2024-09-22 2024-09-22-14-00 6
20 Austin 18 2024-10-20 2024-10-20-21-00 11
21 Mexico 19 2024-10-27 2024-10-27-21-00 17
22 Brazil 20 2024-11-03 2024-11-03-18-00 14
23 Las Vegas 21 2024-11-23 2024-11-23-07-00 8
24 Qatar 22 2024-12-01 2024-12-01-18-00 4
25 Abu Dhabi 23 2024-12-08 2024-12-08-14-00 5

View File

@ -18,7 +18,8 @@ import formula10.controller.admin_controller # type: ignore
# TODO
# General
# - Choose "place to guess" late before the race? Make a page for this
# - Show date for race name, also store time in database
# - Choose "place to guess" late before the race? Make a page for this?
# - Rules page
# - Make user order changeable using drag'n'drop?
@ -26,7 +27,8 @@ import formula10.controller.admin_controller # type: ignore
# - Show cards of previous race results, like with season guesses?
# Statistics
# - Rename "Statistics" to "Leaderboard"
# - Auto calculate points
# - Order user table by points + display points somewhere
# - Show current values for some season guesses (e.g. current most dnfs)
# - Highlight currently correct values for some season guesses (e.g. current most dnfs)
# - Generate static diagram using chart.js + templating the js (funny yikes)

View File

@ -24,7 +24,7 @@ class DbRace(db.Model):
def from_csv(cls, row: List[str]):
db_race: DbRace = cls(name=str(row[0]),
number=int(row[1]),
date=datetime.strptime(row[2], "%Y-%m-%d"),
date=datetime.strptime(str(row[2]), "%Y-%m-%d-%H-%M"),
pxx=int(row[3]))
return db_race

View File

@ -49,7 +49,8 @@
<tr class="table-danger">
<td class="text-nowrap">
<span class="fw-bold">{{ model.current_race.number }}:</span> {{ model.current_race.name }}<br>
<small><span class="fw-bold">Guess:</span> P{{ model.current_race.place_to_guess }}</small>
<small><span class="fw-bold">Guess:</span> P{{ model.current_race.place_to_guess }}</small><br>
<small><span class="fw-bold">Date:</span> {{ model.current_race.date.strftime("%d.%m.%Y %H:%M") }}</small>
</td>
{% if model.all_users() | length > 0 %}
@ -117,7 +118,8 @@
<tr>
<td class="text-nowrap">
<span class="fw-bold">{{ past_result.race.number }}:</span> {{ past_result.race.name }}<br>
<small><span class="fw-bold">Guessed:</span> P{{ past_result.race.place_to_guess }}</small>
<small><span class="fw-bold">Guessed:</span> P{{ past_result.race.place_to_guess }}</small><br>
<small><span class="fw-bold">Date:</span> {{ past_result.race.date.strftime("%d.%m.%Y %H:%M") }}</small>
</td>
{% if model.all_users_or_active_user() | length > 0 %}