def get_submissions():
return sorted(Submission.objects.exclude(answers=None).all(), key=lambda s: -s.final_result)
-minimum = 55
+minimum = 52
class Command(BaseCommand):
action='store',
dest='only_to',
default=None,
- help='Send emails to students'),
+ help='Send emails only to listed addresses'),
)
def handle(self, *args, **options):
def handle_to_students(self, *args, **options):
self.stdout.write('>>> Sending results to students')
- subject = 'Wyniki I etapu Wielkiego Turnieju Edukacji Medialnej'
+ subject = 'Wyniki II etapu Wielkiego Turnieju Edukacji Medialnej'
for submission in get_submissions():
if options['only_to'] and submission.email != options['only_to']:
def handle_to_teachers(self, *args, **options):
self.stdout.write('>>> Sending results to teachers')
- subject = 'Wyniki I etapu Wielkiego Turnieju Edukacji Medialnej'
+ subject = 'Wyniki II etapu Wielkiego Turnieju Edukacji Medialnej'
failed = sent = 0
submissions_by_contact = dict()