use Library.granted_date in sendmails command
This commit is contained in:
parent
bb2b40e50d
commit
0ce0151b16
1 changed files with 2 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue