email: Move and rename find_team_email templates.

This commit is contained in:
Rishi Gupta
2017-05-01 14:52:41 -07:00
committed by Tim Abbott
parent ebfae36494
commit 21a6377204
5 changed files with 4 additions and 6 deletions

View File

@@ -163,7 +163,7 @@ def check_html_templates(templates, all_dups):
'templates/zerver/accounts_home.html',
'templates/zerver/compose.html',
'templates/zerver/emails/digest.html',
'templates/zerver/emails/find_team/find_team_email.html',
'templates/zerver/emails/find_team.html',
'templates/zerver/emails/followup/day1.html',
'templates/zerver/emails/followup/day2.html',
'templates/zerver/emails/invitation_reminder.html',

View File

@@ -385,14 +385,12 @@ def generate_204(request):
def send_find_my_team_emails(user_profile):
# type: (UserProfile) -> None
text_template = 'zerver/emails/find_team/find_team_email.txt'
html_template = 'zerver/emails/find_team/find_team_email.html'
context = {'user_profile': user_profile}
text_content = loader.render_to_string(text_template, context)
html_content = loader.render_to_string(html_template, context)
text_content = loader.render_to_string('zerver/emails/find_team.txt', context)
html_content = loader.render_to_string('zerver/emails/find_team.html', context)
sender = settings.NOREPLY_EMAIL_ADDRESS
recipients = [user_profile.email]
subject = loader.render_to_string('zerver/emails/find_team/find_team_email.subject').strip()
subject = loader.render_to_string('zerver/emails/find_team.subject').strip()
send_mail(subject, text_content, sender, recipients, html_message=html_content)