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