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
6 from django.core.management.base import BaseCommand, CommandError
7 from django.utils.timezone import now
8 from club.models import PayUOrder
11 class Command(BaseCommand):
12 def handle(self, *args, **options):
14 for email in PayUOrder.objects.filter(completed_at__year=2019).order_by('schedule__email').values_list('schedule__email', flat=True).distinct():
16 PayUOrder.send_receipt(email, year)