Browse Source

send mails 4 weeks after project end reached

master
Benni Baermann 4 years ago
parent
commit
422094a240
1 changed files with 15 additions and 2 deletions
  1. +15
    -2
      input/management/commands/sendmails.py

+ 15
- 2
input/management/commands/sendmails.py View File

@ -100,9 +100,22 @@ class Command(BaseCommand):
item.save() item.save()
def surveymails_to_project(self): def surveymails_to_project(self):
pass
'''send survey link 4 weeks after end of project reached'''
supported = Project.objects.filter(granted=True)\
.filter(granted_date__lt = date.today() - timedelta(days=28))\
.exclude(survey_mail_send=True)
print(supported)
for item in supported:
self.survey_link(email=item.email,
type='PRO',
pid=9999, ## TODO
name=item.name,
realname=item.realname)
item.survey_mail_send = True
item.save()
def surveymails_to_travel(self): def surveymails_to_travel(self):
'''send survey link 3 weeks after end of project reached'''
pass pass

Loading…
Cancel
Save