forked from DGNum/gestioCOF
Améliorations
This commit is contained in:
parent
ce03a28b4b
commit
c3631e2cd5
1 changed files with 1 additions and 3 deletions
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue