1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-21 16:38:23 +02:00

Export notation sheets on Google Sheets

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello
2024-03-30 13:41:46 +01:00
parent 0006ecc90d
commit c522387482
6 changed files with 446 additions and 7 deletions

View File

@ -0,0 +1,17 @@
# 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()