mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2024-12-29 16:41:56 +00:00
增加设置中url格式的提示,防止拼接url的时候出现多余的/符号
This commit is contained in:
parent
be4fc9f88f
commit
fd790453a1
@ -330,8 +330,7 @@ class ApplyResetPasswordAPIView(APIView):
|
||||
|
||||
email_template = email_template.replace("{{ username }}", user.username). \
|
||||
replace("{{ website_name }}", settings.WEBSITE_INFO["website_name"]). \
|
||||
replace("{{ link }}", request.scheme + "://"
|
||||
+ request.META['HTTP_HOST'] + "/reset_password/t/" +
|
||||
replace("{{ link }}", settings.WEBSITE_INFO["url"] + "/reset_password/t/" +
|
||||
user.reset_password_token)
|
||||
|
||||
_send_email.delay(settings.WEBSITE_INFO["website_name"],
|
||||
|
@ -5,6 +5,7 @@ import os
|
||||
WEBSITE_INFO = {"website_name": u"example大学 OnlineJudge",
|
||||
"website_name_shortcut": u"example oj",
|
||||
"website_footer": u"example大学信息学院<a href=\"http://www.miibeian.gov.cn/\">京ICP备xxxxx号-1</a>",
|
||||
# url结尾没有/
|
||||
"url": u"https://your-domain-or-ip.com"}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user