Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

feature/issue-214 Registration email modification #122

Merged
merged 2 commits into from
Sep 8, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix
  • Loading branch information
Bidaya0 committed Sep 8, 2021
commit 22f1c61c96ad7acdf537f114c77a99e349d72d7d
8 changes: 4 additions & 4 deletions iast/views/user_register_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ def post(self, request, token):
:return:
"""

#webhook_token = settings.config.get('wenjuan_webhook', 'token')
if 1 or token == webhook_token:
webhook_token = settings.config.get('wenjuan_webhook', 'token')
if token == webhook_token:
entry = request.data['entry']
username = entry['field_1']
phone = entry['field_2']
Expand Down Expand Up @@ -101,8 +101,8 @@ def register_with_raw(username, email_addr, phone, email):
from_addr=settings.EMAIL_FROM_ADDR,
to_addrs=[email_addr, settings.ADMIN_EMAIL],
_subject='【洞态IAST】账号创建成功',
_content=f'''<h3>洞态IAST账号创建成功</h3><span>登陆地址:</span>https://iast.io/login账号:{username}密码:{password}<br/>登陆之后,请马上修改默认密码,然后重新登陆使用。<br/>官方网站:https://dongtai.io<br/><img width="400px" height="400px" src="{GONG_ZHONG_HAO_IMAGE}" ><hr></hr><h3>Welcome to DongTai IAST,
your account has been succefully created.</h3><span>Login URL:</span>https://iast.io/loginAccount:{username}Password:{password}<br/>Notice: You MUST change the password during the first time log in. Password can be changed at "Settings/Account". After that, you can log in again.<br/>DongTai IAST Official Website: https://dongtai.io<br/><img width="400px" height="400px" src="{GONG_ZHONG_HAO_IMAGE}">''',
_content=f'''<h3>洞态IAST账号创建成功</h3><span>登陆地址:</span>https://iast.io/login<br></br>账号:{username}<br></br>密码:{password}<br></br><br/>登陆之后,请马上修改默认密码,然后重新登陆使用。<br/><br></br>官方网站:https://dongtai.io<br/><br></br><br>官方公众号:洞态公众号二维码</br><img width="400px" height="400px" src="{GONG_ZHONG_HAO_IMAGE}" ><hr></hr><h3>Welcome to DongTai IAST,
your account has been succefully created.</h3><span>Login URL:</span>https://iast.io/login<br></br>Account:{username}<br></br>Password:{password}<br></br><br/>Notice: You MUST change the password during the first time log in. Password can be changed at "Settings/Account". After that, you can log in again.<br/>DongTai IAST Official Website: https://dongtai.io<br/><br></br><br>DongTai IAST WeChat Official Account: DongTai IAST's QR Code </br><img width="400px" height="400px" src="{GONG_ZHONG_HAO_IMAGE}">''',
content_type='html',
)
print(res)
Expand Down