mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-11-26 14:47:09 +00:00
c522387482
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
18 lines
701 B
Python
18 lines
701 B
Python
# Copyright (C) 2024 by Animath
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
from django.core.management import BaseCommand
|
|
from participation.models import Tournament
|
|
|
|
|
|
class Command(BaseCommand):
|
|
def handle(self, *args, **options):
|
|
for tournament in Tournament.objects.all():
|
|
if options['verbosity'] >= 1:
|
|
self.stdout.write(f"Updating notation sheet for {tournament}")
|
|
tournament.create_spreadsheet()
|
|
for pool in tournament.pools.all():
|
|
if options['verbosity'] >= 1:
|
|
self.stdout.write(f"Updating notation sheet for pool {pool.short_name} for {tournament}")
|
|
pool.update_spreadsheet()
|