equal
deleted
inserted
replaced
16 """Sends a mail to each delegate about the template content specified. |
16 """Sends a mail to each delegate about the template content specified. |
17 """ |
17 """ |
18 |
18 |
19 users = User.objects.all() |
19 users = User.objects.all() |
20 |
20 |
21 subject = loader.render_to_string(subject_template) |
21 subject = loader.render_to_string(subject_template).strip(' \n\t') |
22 |
22 |
23 for user in users: |
23 for user in users: |
24 profile = user.getprofile() |
24 profile = user.get_profile() |
25 if profile: |
25 if profile: |
26 full_name = profile.name |
26 full_name = profile.full_name |
27 else: |
27 else: |
28 full_name = '' |
28 full_name = '' |
29 |
29 |
30 message = loader.render_to_string( |
30 message = loader.render_to_string( |
31 body_template, dictionary={'name': full_name}) |
31 body_template, dictionary={'name': full_name}) |