Améliorations

This commit is contained in:
Martin Pépin 2016-07-15 02:20:58 +02:00
parent ce03a28b4b
commit c3631e2cd5

View file

@ -14,7 +14,7 @@ class Command(BaseCommand):
def handle(self, *args, **options): def handle(self, *args, **options):
now = timezone.now() now = timezone.now()
delay = timedelta(4) delay = timedelta(days=4)
shows = Spectacle.objects \ shows = Spectacle.objects \
.filter(date__range=(now, now+delay)) \ .filter(date__range=(now, now+delay)) \
.filter(tirage__active=True) \ .filter(tirage__active=True) \
@ -22,8 +22,6 @@ class Command(BaseCommand):
.all() .all()
for show in shows: for show in shows:
show.send_rappel() show.send_rappel()
show.rappel_sent = now
show.save()
self.stdout.write( self.stdout.write(
'Mails de rappels pour %s envoyés avec succès.' % show) 'Mails de rappels pour %s envoyés avec succès.' % show)
if not shows: if not shows: