diff --git a/participation/management/commands/export_results.py b/participation/management/commands/export_results.py index 55ee898..2cf4d04 100644 --- a/participation/management/commands/export_results.py +++ b/participation/management/commands/export_results.py @@ -52,11 +52,11 @@ class Command(BaseCommand): self.w("") self.w("") self.w("") - self.w("\t") - self.w("\t") - self.w("\t") - self.w("\t") - self.w("\t") + self.w(" ") + self.w(" ") + self.w(" ") + self.w(" ") + self.w(" ") self.w("") self.w("") self.w("") @@ -64,16 +64,17 @@ class Command(BaseCommand): self.w("") bold = (not tournament.final and participation.final) or (tournament.final and i < 2) if bold: - prefix, suffix = "\t" + prefix, suffix = " " else: - prefix, suffix = "\t" + prefix, suffix = " " self.w(f"{participation.team.name} ({participation.team.trigram})", prefix, suffix) - for pool in tournament.pools.filter(participations=participation).all(): - pool_note = pool.average(participation) + for tournament_round in [1, 2]: + pool_note = sum(pool.average(participation) + for pool in tournament.pools.filter(participations=participation, + round=tournament_round).all()) self.w(f"{pool_note:.01f}", prefix, suffix) self.w(f"{note:.01f}", prefix, suffix) - if tournament.final: - self.w(participation.mention_final if tournament.final else participation.mention, prefix, suffix) + self.w(participation.mention_final if tournament.final else participation.mention, prefix, suffix) self.w("") self.w("") self.w("
ÉquipeScore Tour 1Score Tour 2TotalPrixÉquipeScore Tour 1Score Tour 2TotalPrix
", "", "", "", "
")