|
|
|
@ -93,7 +93,9 @@ def sendgrid_update_recipients(): |
|
|
|
'last_school_purchase': last_school_purchase, |
|
|
|
'last_school_purchase': last_school_purchase, |
|
|
|
'gender': {User.NOT_DEFINED: '', User.MALE: 'Мужчина', User.FEMALE: 'Женщина'}[user.gender], |
|
|
|
'gender': {User.NOT_DEFINED: '', User.MALE: 'Мужчина', User.FEMALE: 'Женщина'}[user.gender], |
|
|
|
'birthday': user.birthday and user.birthday.strftime(date_format), |
|
|
|
'birthday': user.birthday and user.birthday.strftime(date_format), |
|
|
|
|
|
|
|
'date_joined': user.date_joined.strftime(date_format), |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
sg = get_sendgrid_client() |
|
|
|
sg = get_sendgrid_client() |
|
|
|
response = sg.client.contactdb.recipients.patch(request_body=data) |
|
|
|
response = sg.client.contactdb.recipients.patch(request_body=data) |
|
|
|
|
|
|
|
print(response.body) |
|
|
|
|