From: Jan Szejko Date: Thu, 12 Jan 2017 14:59:56 +0000 (+0100) Subject: fix email teachers command X-Git-Url: https://git.mdrn.pl/edumed.git/commitdiff_plain/945987f6388d123bce3ba543618cae13f5bfce8f fix email teachers command --- diff --git a/stage2/management/commands/stage2_email_teachers.py b/stage2/management/commands/stage2_email_teachers.py index dceb831..35c136c 100644 --- a/stage2/management/commands/stage2_email_teachers.py +++ b/stage2/management/commands/stage2_email_teachers.py @@ -3,7 +3,6 @@ from django.core.management.base import BaseCommand from django.template.loader import render_to_string -from contact.models import Contact from stage2.models import Participant from wtem.management.commands import send_mail @@ -16,8 +15,8 @@ class Command(BaseCommand): query = Participant.objects.order_by('contact__contact').distinct('contact__contact')\ .values_list('contact__contact', flat=True) template_name = args[0] - message = render_to_string('wtem/' + template_name + '.txt') - subject = render_to_string('wtem/' + template_name + '_subject.txt') + message = render_to_string('stage2/' + template_name + '.txt') + subject = render_to_string('stage2/' + template_name + '_subject.txt') answer = raw_input( 'Send the following to %d teachers with subject "%s"\n\n %s\n\n?' %