mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-02-24 03:01:19 +00:00
Compare commits
No commits in common. "1138885fb476556e506ba159f80ffff2e98e5be0" and "7a0341e7cfdcad918c704e07a64b2ad0f20fd132" have entirely different histories.
1138885fb4
...
7a0341e7cf
@ -17,8 +17,8 @@ class Command(BaseCommand):
|
|||||||
self.w("")
|
self.w("")
|
||||||
self.w("")
|
self.w("")
|
||||||
|
|
||||||
def w(self, msg, prefix="", suffix=""):
|
def w(self, msg):
|
||||||
self.stdout.write(f"{prefix}{msg}{suffix}")
|
self.stdout.write(msg)
|
||||||
|
|
||||||
def handle_tournament(self, tournament):
|
def handle_tournament(self, tournament):
|
||||||
name = tournament.name
|
name = tournament.name
|
||||||
@ -52,29 +52,28 @@ class Command(BaseCommand):
|
|||||||
self.w("<table>")
|
self.w("<table>")
|
||||||
self.w("<thead>")
|
self.w("<thead>")
|
||||||
self.w("<tr>")
|
self.w("<tr>")
|
||||||
self.w(" <th>Équipe</th>")
|
self.w("\t<th>Équipe</th>")
|
||||||
self.w(" <th>Score Tour 1</th>")
|
self.w("\t<th>Score Tour 1</th>")
|
||||||
self.w(" <th>Score Tour 2</th>")
|
self.w("\t<th>Score Tour 2</th>")
|
||||||
self.w(" <th>Total</th>")
|
self.w("\t<th>Total</th>")
|
||||||
self.w(" <th class=\"has-text-align-center\">Prix</th>")
|
self.w("\t<th class=\"has-text-align-center\">Prix</th>")
|
||||||
self.w("</tr>")
|
self.w("</tr>")
|
||||||
self.w("</thead>")
|
self.w("</thead>")
|
||||||
self.w("<tbody>")
|
self.w("<tbody>")
|
||||||
for i, (participation, note) in enumerate(notes):
|
for i, (participation, note) in enumerate(notes):
|
||||||
self.w("<tr>")
|
self.w("<tr>")
|
||||||
bold = (not tournament.final and participation.final) or (tournament.final and i < 2)
|
if i < (2 if len(notes) >= 7 else 1):
|
||||||
if bold:
|
self.w(f"\t<th>{participation.team.name} ({participation.team.trigram})</td>")
|
||||||
prefix, suffix = " <td><strong>", "</strong></td>"
|
|
||||||
else:
|
else:
|
||||||
prefix, suffix = " <td>", "</td>"
|
self.w(f"\t<td>{participation.team.name} ({participation.team.trigram})</td>")
|
||||||
self.w(f"{participation.team.name} ({participation.team.trigram})", prefix, suffix)
|
for pool in tournament.pools.filter(participations=participation).all():
|
||||||
for tournament_round in [1, 2]:
|
pool_note = pool.average(participation)
|
||||||
pool_note = sum(pool.average(participation)
|
self.w(f"\t<td>{pool_note:.01f}</td>")
|
||||||
for pool in tournament.pools.filter(participations=participation,
|
self.w(f"\t<td>{note:.01f}</td>")
|
||||||
round=tournament_round).all())
|
if tournament.final:
|
||||||
self.w(f"{pool_note:.01f}", prefix, suffix)
|
self.w(f"\t<td>{participation.mention_final}</td>")
|
||||||
self.w(f"{note:.01f}", prefix, suffix)
|
else:
|
||||||
self.w(participation.mention_final if tournament.final else participation.mention, prefix, suffix)
|
self.w(f"\t<td>{participation.mention}</td>")
|
||||||
self.w("</tr>")
|
self.w("</tr>")
|
||||||
self.w("</tbody>")
|
self.w("</tbody>")
|
||||||
self.w("</table>")
|
self.w("</table>")
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/2 * * * * cd /code && python manage.py update_index &> /dev/null
|
*/2 * * * * cd /code && python manage.py update_index &> /dev/null
|
||||||
|
|
||||||
# Recreate sympa lists
|
# Recreate sympa lists
|
||||||
7 3 * * * cd /code && python manage.py fix_sympa_lists &> /dev/null
|
*/2 * * * * cd /code && python manage.py fix_sympa_lists &> /dev/null
|
||||||
|
|
||||||
# Check payments from Hello Asso
|
# Check payments from Hello Asso
|
||||||
*/6 * * * * cd /code && python manage.py check_hello_asso &> /dev/null
|
*/6 * * * * cd /code && python manage.py check_hello_asso &> /dev/null
|
||||||
|
Loading…
x
Reference in New Issue
Block a user