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("
Équipe | ") - self.w("\tScore Tour 1 | ") - self.w("\tScore Tour 2 | ") - self.w("\tTotal | ") - self.w("\tPrix | ") + self.w("Équipe | ") + self.w("Score Tour 1 | ") + self.w("Score Tour 2 | ") + self.w("Total | ") + self.w("Prix | ") self.w("
---|---|---|---|---|---|---|---|---|---|
", " | " + 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("