diff --git a/input/management/commands/sendmails.py b/input/management/commands/sendmails.py index 49ced69..9cd8440 100644 --- a/input/management/commands/sendmails.py +++ b/input/management/commands/sendmails.py @@ -46,7 +46,6 @@ class Command(BaseCommand): def end_of_projects_reached(self): ''' end of project reached ''' # get all projects which ended - # - timedelta(days=21)) old = Project.objects.filter(end__lt = date.today())\ .exclude(end_mail_send = True) @@ -73,7 +72,9 @@ class Command(BaseCommand): self.end_of_projects_reached() + # get all library objects which where granted two weeks ago supported = Library.objects.filter(granted=True)\ + .filter(granted_date__lt = date.today() - timedelta(days=14))\ .exclude(survey_mail_send=True) print(supported) for item in supported: