Send html for email change

This commit is contained in:
cuom1999 2023-08-25 15:58:59 -05:00
parent 0d3ebaba47
commit 20a8f29cd6
2 changed files with 8 additions and 4 deletions

View file

@ -52,7 +52,13 @@ def email_change_view(request):
),
}
message = render_email_message(request, email_contexts)
send_mail(subject, message, settings.EMAIL_HOST_USER, [new_email])
send_mail(
subject,
message,
settings.EMAIL_HOST_USER,
[new_email],
html_message=message,
)
profile.email_change_pending = new_email
profile.save()
return redirect("email_change_pending")

View file

@ -2860,10 +2860,8 @@ msgid "New Email"
msgstr "Email mới"
#: judge/views/email.py:25
#, fuzzy
#| msgid "Contest with key already exists."
msgid "An account with this email already exists."
msgstr "Mã kỳ thi đã tồn tại."
msgstr "Email đã được dùng cho tài khoản khác."
#: judge/views/email.py:43
msgid "Email Change Request"