Custom invite text for MIT invitations.

(imported from commit 21b72861e991159eb7faa74809edb8d01027c6c8)
This commit is contained in:
Waseem Daher
2013-09-19 17:42:49 -04:00
parent 6eda9c3314
commit 7afd3ecc81
3 changed files with 22 additions and 2 deletions

View File

@@ -1584,10 +1584,17 @@ def do_send_confirmation_email(invitee, referrer):
`invitee` is a PreregistrationUser.
`referrer` is a UserProfile.
"""
subject_template_path = 'confirmation/invite_email_subject.txt'
body_template_path = 'confirmation/invite_email_body.txt'
if referrer.realm.domain == 'mit.edu':
subject_template_path = 'confirmation/mituser_invite_email_subject.txt'
body_template_path = 'confirmation/mituser_invite_email_body.txt'
Confirmation.objects.send_confirmation(
invitee, invitee.email, additional_context={'referrer': referrer},
subject_template_path='confirmation/invite_email_subject.txt',
body_template_path='confirmation/invite_email_body.txt')
subject_template_path=subject_template_path,
body_template_path=body_template_path)
def build_message_list(user_profile, messages):
"""