From ad1b0e238cbc18d6c9b7c9ea202e24bede426524 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Tue, 11 Oct 2022 11:23:43 +0200 Subject: [PATCH] =?UTF-8?q?P=C5=99=C3=ADkaz=20na=20p=C5=99egenerovan=C3=AD?= =?UTF-8?q?=20zmra=C5=BEen=C3=BDch=20v=C3=BDsledkovek?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commands/pregeneruj_zmrazene_vysledkovky.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 seminar/management/commands/pregeneruj_zmrazene_vysledkovky.py diff --git a/seminar/management/commands/pregeneruj_zmrazene_vysledkovky.py b/seminar/management/commands/pregeneruj_zmrazene_vysledkovky.py new file mode 100644 index 00000000..d728ab0f --- /dev/null +++ b/seminar/management/commands/pregeneruj_zmrazene_vysledkovky.py @@ -0,0 +1,11 @@ +from django.core.management.base import BaseCommand +import seminar.models as m + + +class Command(BaseCommand): + help = "Všem deadlinům se zveřejněnou výsledkovkou vygeneruj výsledkovku" + + def handle(self, *args, **options): + for deadline in m.Deadline.objects.filter(verejna_vysledkovka=True): + deadline.vygeneruj_vysledkovku() +