Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix email template
Marek Brzóska7db9c40cdba8
diff --git a/registration/forms.py b/registration/forms.pyindex f9e31449b7..491b78b05d 100644--- a/registration/forms.py+++ b/registration/forms.py@@ -30,7 +30,7 @@ class RequestEmailConfirmationForm(forms.Form):email = forms.EmailField()- template = 'registration/email/confirm_email.txt'+ template = 'registration/emails/confirm_email.txt'def __init__(self, local_host=None, data=None):self.local_host = local_host@@ -52,9 +52,7 @@ class RequestEmailConfirmationForm(forms.Form):class RequestEmailChangeForm(RequestEmailConfirmationForm):- email = forms.EmailField()-- template = 'registration/email/change_email.txt'+ template = 'registration/emails/change_email.txt'def __init__(self, user=None, *args, **kwargs):self.user = userdiff --git a/registration/templates/registration/email/change_email.txt b/registration/templates/registration/emails/change_email.txtsimilarity index 56%rename from registration/templates/registration/email/change_email.txtrename to registration/templates/registration/emails/change_email.txtindex 680e311761..fc27738756 100644--- a/registration/templates/registration/email/change_email.txt+++ b/registration/templates/registration/emails/change_email.txt@@ -1,4 +1,8 @@-Hi!+{% load i18n %}++{% block subject %}{% trans "Confirm your email address" %}{% endblock %}++{% block text %}{% blocktrans %}Hi!You have requested email change in saleor project. To continue visit the link below.@@ -7,4 +11,4 @@ You have requested email change in saleor project. To continue visit the link beIf you didn't mean to change your email please ignore this message. We apologise for inconvenience.Sincerely,-Saleor Team+Saleor Team{% endblocktrans %}{% endblock %}diff --git a/registration/tests.py b/registration/tests.pyindex d3e5e7e63e..293e0f4539 100644--- a/registration/tests.py+++ b/registration/tests.py@@ -298,7 +298,7 @@ class EmailChangeTestCase(TestCase):get.assert_called_once_with(token=token_object.token, valid_until__gte=now())self.assertFalse(request.user.is_authenticated())- self.assertEqual(token_object.delete.call_count, 0)+ token_object.delete.assert_not_called()@patch('registration.views.now')@patch('registration.views.EmailChangeRequest.objects.get')