From 92dd76822fbf9a2257c3d7721191d3122f6e9dcb Mon Sep 17 00:00:00 2001 From: Rishi Gupta Date: Mon, 1 May 2017 15:05:52 -0700 Subject: [PATCH] email: Move and rename password reset templates. --- .../emails/password_reset.subject} | 0 .../emails/password_reset.txt} | 0 zerver/management/commands/send_password_reset_email.py | 4 ++-- zproject/urls.py | 3 ++- 4 files changed, 4 insertions(+), 3 deletions(-) rename templates/{registration/password_reset_subject.txt => zerver/emails/password_reset.subject} (100%) rename templates/{registration/password_reset_email.txt => zerver/emails/password_reset.txt} (100%) diff --git a/templates/registration/password_reset_subject.txt b/templates/zerver/emails/password_reset.subject similarity index 100% rename from templates/registration/password_reset_subject.txt rename to templates/zerver/emails/password_reset.subject diff --git a/templates/registration/password_reset_email.txt b/templates/zerver/emails/password_reset.txt similarity index 100% rename from templates/registration/password_reset_email.txt rename to templates/zerver/emails/password_reset.txt diff --git a/zerver/management/commands/send_password_reset_email.py b/zerver/management/commands/send_password_reset_email.py index 76ca7b24fc..8d288d9bd5 100644 --- a/zerver/management/commands/send_password_reset_email.py +++ b/zerver/management/commands/send_password_reset_email.py @@ -45,8 +45,8 @@ class Command(BaseCommand): self.send(users) def send(self, users, - subject_template_name='registration/password_reset_subject.txt', - email_template_name='registration/password_reset_email.txt', + subject_template_name='zerver/emails/password_reset.subject', + email_template_name='zerver/emails/password_reset.txt', use_https=True, token_generator=default_token_generator, from_email=None, html_email_template_name=None): # type: (List[UserProfile], str, str, bool, PasswordResetTokenGenerator, Optional[Text], Optional[str]) -> None diff --git a/zproject/urls.py b/zproject/urls.py index 47137bfcd5..687605bd7c 100644 --- a/zproject/urls.py +++ b/zproject/urls.py @@ -80,7 +80,8 @@ i18n_urls = [ url(r'^accounts/password/reset/$', password_reset, {'post_reset_redirect': '/accounts/password/reset/done/', 'template_name': 'zerver/reset.html', - 'email_template_name': 'registration/password_reset_email.txt', + 'email_template_name': 'zerver/emails/password_reset.txt', + 'subject_template_name': 'zerver/emails/password_reset.subject', 'password_reset_form': zerver.forms.ZulipPasswordResetForm, }, name='django.contrib.auth.views.password_reset'), url(r'^accounts/password/reset/done/$', password_reset_done,