Large database migration
All checks were successful
Build Formula10 Docker Image / build-docker (push) Successful in 15s

This commit is contained in:
2024-03-03 15:38:35 +01:00
parent 96cb8ca891
commit d3097038a5
34 changed files with 307 additions and 593 deletions

View File

@ -34,7 +34,7 @@
{% endif %}
{% for driver in drivers %}
<option value="{{ driver.name }}">{{ driver.abbr }}</option>
<option value="{{ driver.id }}">{{ driver.abbr }}</option>
{% endfor %}
</select>
<label for="{{ name }}" class="text-primary">{{ label }}</label>
@ -55,13 +55,13 @@
{% for driver in drivers %}
{% if driver_match == driver %}
{% set user_has_chosen.driverpre = true %}
<option selected="selected" value="{{ driver.name }}">{{ driver.abbr }}</option>
<option selected="selected" value="{{ driver.id }}">{{ driver.abbr }}</option>
{% else %}
<option value="{{ driver.name }}">{{ driver.abbr }}</option>
<option value="{{ driver.id }}">{{ driver.abbr }}</option>
{% endif %}
{% if (include_none == true) and (driver == model.none_driver()) %}
<option disabled>──────────</option>
<option disabled="disabled">──────────</option>
{% endif %}
{% endfor %}
@ -85,7 +85,7 @@
{% endif %}
{% for team in teams %}
<option value="{{ team.name }}">{{ team.name }}</option>
<option value="{{ team.id }}">{{ team.name }}</option>
{% endfor %}
</select>
<label for="{{ name }}" class="text-primary">{{ label }}</label>
@ -106,13 +106,13 @@
{% for team in teams %}
{% if team_match == team %}
{% set user_has_chosen.teampre = true %}
<option selected="selected" value="{{ team.name }}">{{ team.name }}</option>
<option selected="selected" value="{{ team.id }}">{{ team.name }}</option>
{% else %}
<option value="{{ team.name }}">{{ team.name }}</option>
<option value="{{ team.id }}">{{ team.name }}</option>
{% endif %}
{% if (include_none == true) and (team == model.none_team()) %}
<option disabled>──────────</option>
<option disabled="disabled">──────────</option>
{% endif %}
{% endfor %}

View File

@ -60,6 +60,7 @@
{% endif %}
<form action="{{ action_save_href }}" method="post">
{# Place numbers #}
<ul class="list-group list-group-flush d-inline-block">
{% for driver in model.all_drivers_or_active_result_standing_drivers() %}
<li class="list-group-item p-1"><span id="place_number"
@ -68,6 +69,7 @@
{% endfor %}
</ul>
{# Drag and drop #}
<ul id="columns" class="list-group list-group-flush d-inline-block float-end">
{% for driver in model.all_drivers_or_active_result_standing_drivers() %}
@ -79,40 +81,40 @@
{# Driver DNFed at first #}
<div class="form-check form-check-reverse d-inline-block">
<input type="checkbox" class="form-check-input"
value="{{ driver.name }}"
id="first-dnf-{{ driver.name }}" name="first-dnf-drivers"
value="{{ driver.id }}"
id="first-dnf-{{ driver.id }}" name="first-dnf-drivers"
{% if (model.active_result is not none) and (driver in model.active_result.initial_dnf) %}checked{% endif %}
{% if race_result_open == false %}readonly="readonly"{% endif %}>
<label for="first-dnf-{{ driver.name }}"
{% if race_result_open == false %}disabled="disabled"{% endif %}>
<label for="first-dnf-{{ driver.id }}"
class="form-check-label text-muted">1. DNF</label>
</div>
{# Driver DNFed #}
<div class="form-check form-check-reverse d-inline-block mx-2">
<input type="checkbox" class="form-check-input"
value="{{ driver.name }}"
id="dnf-{{ driver.name }}" name="dnf-drivers"
value="{{ driver.id }}"
id="dnf-{{ driver.id }}" name="dnf-drivers"
{% if (model.active_result is not none) and (driver in model.active_result.all_dnfs) %}checked{% endif %}
{% if race_result_open == false %}readonly="readonly"{% endif %}>
<label for="dnf-{{ driver.name }}"
{% if race_result_open == false %}disabled="disabled"{% endif %}>
<label for="dnf-{{ driver.id }}"
class="form-check-label text-muted">DNF</label>
</div>
{# Driver Excluded #}
<div class="form-check form-check-reverse d-inline-block">
<input type="checkbox" class="form-check-input"
value="{{ driver.name }}"
id="exclude-{{ driver.name }}" name="excluded-drivers"
value="{{ driver.id }}"
id="exclude-{{ driver.id }}" name="excluded-drivers"
{% if (model.active_result is not none) and (driver in model.active_result.standing_exclusions) %}checked{% endif %}
{% if race_result_open == false %}readonly="readonly"{% endif %}>
<label for="exclude-{{ driver.name }}"
{% if race_result_open == false %}disabled="disabled"{% endif %}>
<label for="exclude-{{ driver.id }}"
class="form-check-label text-muted" data-bs-toggle="tooltip"
title="Driver is not counted for standing">NC</label>
</div>
</div>
{# Standing order #}
<input type="hidden" name="pxx-drivers" value="{{ driver.name }}">
<input type="hidden" name="pxx-drivers" value="{{ driver.id }}">
</li>
{% endfor %}
</ul>

View File

@ -102,26 +102,26 @@
<div class="g-col-6">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio"
name="teamwinner-{{ team.name }}"
id="teamwinner-{{ team.name }}-1-{{ user.name }}"
value="{{ driver_a.name }}"
name="teamwinner-{{ team.id }}"
id="teamwinner-{{ team.id }}-1-{{ user.id }}"
value="{{ driver_a.id }}"
{% if (user_guess is not none) and (driver_a in user_guess.team_winners) %}checked="checked"{% endif %}
{% if season_guess_open == false %}disabled="disabled"{% endif %}>
<label class="form-check-label {% if (user_guess is not none) and (driver_a in user_guess.team_winners) and points.is_team_winner(driver_a) %}text-success{% endif %}"
for="teamwinner-{{ team.name }}-1-{{ user.name }}">{{ driver_a.name }}</label>
for="teamwinner-{{ team.id }}-1-{{ user.id }}">{{ driver_a.name }}</label>
</div>
</div>
<div class="g-col-6">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio"
name="teamwinner-{{ team.name }}"
id="teamwinner-{{ team.name }}-2-{{ user.name }}"
value="{{ driver_b.name }}"
name="teamwinner-{{ team.id }}"
id="teamwinner-{{ team.id }}-2-{{ user.id }}"
value="{{ driver_b.id }}"
{% if (user_guess is not none) and (driver_b in user_guess.team_winners) %}checked="checked"{% endif %}
{% if season_guess_open == false %}disabled="disabled"{% endif %}>
<label class="form-check-label {% if (user_guess is not none) and (driver_b in user_guess.team_winners) and points.is_team_winner(driver_b) %}text-success{% endif %}"
for="teamwinner-{{ team.name }}-2-{{ user.name }}">{{ driver_b.name }}</label>
for="teamwinner-{{ team.id }}-2-{{ user.id }}">{{ driver_b.name }}</label>
</div>
</div>
{% endfor %}
@ -139,12 +139,12 @@
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox"
name="podiumdrivers"
id="podium-{{ driver_a.name }}-{{ user.name }}"
value="{{ driver_a.name }}"
id="podium-{{ driver_a.id }}-{{ user.id }}"
value="{{ driver_a.id }}"
{% if (user_guess is not none) and (driver_a in user_guess.podiums) %}checked="checked"{% endif %}
{% if season_guess_open == false %}disabled="disabled"{% endif %}>
<label class="form-check-label {% if (user_guess is not none) and (driver_a in user_guess.podiums) and points.has_podium(driver_a) %}text-success{% endif %}"
for="podium-{{ driver_a.name }}-{{ user.name }}">{{ driver_a.name }}</label>
for="podium-{{ driver_a.id }}-{{ user.id }}">{{ driver_a.name }}</label>
</div>
</div>
@ -152,12 +152,12 @@
<div class="form-check form-check-inline">
<input class="form-check-input" type="checkbox"
name="podiumdrivers"
id="podium-{{ driver_b.name }}-{{ user.name }}"
value="{{ driver_b.name }}"
id="podium-{{ driver_b.id }}-{{ user.id }}"
value="{{ driver_b.id }}"
{% if (user_guess is not none) and (driver_b in user_guess.podiums) %}checked="checked"{% endif %}
{% if season_guess_open == false %}disabled="disabled"{% endif %}>
<label class="form-check-label {% if (user_guess is not none) and (driver_b in user_guess.podiums) and points.has_podium(driver_b) %}text-success{% endif %}"
for="podium-{{ driver_b.name }}-{{ user.name }}">{{ driver_b.name }}</label>
for="podium-{{ driver_b.id }}-{{ user.id }}">{{ driver_b.name }}</label>
</div>
</div>
{% endfor %}