def send_keys(self, *args, **options):
sent = 0
- skipped = 0
failed = 0
submissions = Submission.objects.all()
self.send_key(submission)
except Exception as e:
failed += 1
- self.stdout.write('failed sending to: ' + submission.email + ' - ' + str(e))
+ self.stdout.write('failed sending to: ' + submission.email + ' - ' + repr(e))
else:
submission.key_sent = True
submission.save()
def send_key(self, submission):
self.stdout.write('>>> sending to ' + submission.email)
send_mail(
- subject="WTEM - Twój link do zadań",
+ subject="Olimpiada Cyfrowa - Twój link do zadań I etapu",
body=render_to_string('wtem/email_key.txt', dict(submission=submission)),
to=[submission.email])