Example #1
0
def send_inactive_account_reminder():
    try:
        email = BroadcastEmail.objects.get(
            subject="We miss your astrophotographs!")
        recipients = inactive_accounts()
        send_broadcast_email.delay(
            email, recipients.values_list('user__email', flat=True))
        recipients.update(inactive_account_reminder_sent=timezone.now())
    except BroadcastEmail.DoesNotExist:
        pass
Example #2
0
 def submit_inactive_email_reminder(self, request, obj):
     recipients = inactive_accounts()
     self.submit_email(request, obj, recipients.values_list('user__email', flat=True))
     recipients.update(inactive_account_reminder_sent=timezone.now())