1 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
4 from datetime import timedelta
5 from django.core.management.base import BaseCommand, CommandError
6 from django.utils.timezone import now
7 from club.models import Schedule
10 class Command(BaseCommand):
11 def handle(self, *args, **options):
12 for s in Schedule.objects.exclude(monthly=False, yearly=False).filter(is_cancelled=False, expires_at__lt=now() + timedelta(1)):
13 print(s, s.email, s.expires_at)