From 945987f6388d123bce3ba543618cae13f5bfce8f Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Thu, 12 Jan 2017 15:59:56 +0100 Subject: [PATCH 1/1] fix email teachers command --- stage2/management/commands/stage2_email_teachers.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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?' % -- 2.20.1