fnp
/
edumed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
eeac286
)
fix email teachers command
author
Jan Szejko
<janek37@gmail.com>
Thu, 12 Jan 2017 14:59:56 +0000
(15:59 +0100)
committer
Jan Szejko
<janek37@gmail.com>
Thu, 12 Jan 2017 14:59:56 +0000
(15:59 +0100)
stage2/management/commands/stage2_email_teachers.py
patch
|
blob
|
history
diff --git
a/stage2/management/commands/stage2_email_teachers.py
b/stage2/management/commands/stage2_email_teachers.py
index
dceb831
..
35c136c
100644
(file)
--- 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 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
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]
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?' %
answer = raw_input(
'Send the following to %d teachers with subject "%s"\n\n %s\n\n?' %