diff --git a/account/templates/reset_password_email.html b/account/templates/reset_password_email.html index b2f76f88..54dcc55a 100644 --- a/account/templates/reset_password_email.html +++ b/account/templates/reset_password_email.html @@ -1,77 +1,31 @@ - - - - - - -
- - - - - - -
- {{ website_name }} -
- - - - - +
+
+ + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ {{ website_name }}
+
+

Hello, {{ username }}:

+

+ Please click {{ link }} to reset your password in 20 minutes. +

+

+ To protect your account, please do not use simple passwords. +

+

+ If you still have any questions, please contract system administrator. +

+

+

{{ website_name }}

+
+
- Hello, {{ username }}: -
- We received a request to reset your password for {{ website_name }}. -
- You can use the following link to reset your password in 20 minutes. -
- Reset Password -
- If the button above doesn't work, please copy the following link to your browser and press enter. -
- - {{ link }} - -
- If you did not ask that, please ignore this email. It will expire and become useless in 20 minutes. -
-
\ No newline at end of file + + + \ No newline at end of file diff --git a/account/views/oj.py b/account/views/oj.py index 4aaec7cb..79b5622e 100644 --- a/account/views/oj.py +++ b/account/views/oj.py @@ -302,11 +302,11 @@ class ApplyResetPasswordAPI(APIView): "link": f"{SysOptions.website_base_url}/reset-password/{user.reset_password_token}" } email_html = render_to_string("reset_password_email.html", render_data) - send_email_async.delay(SysOptions.website_name, - user.email, - user.username, - f"{SysOptions.website_name} 登录信息找回邮件", - email_html) + send_email_async.delay(from_name=SysOptions.website_name_shortcut, + to_email=user.email, + to_username=user.username, + subject=f"Reset your password", + content=email_html) return self.success("Succeeded")