Skip to content

Commit a6e916c

Browse files
committed
借鉴(复制)django的用户加密模式
修复创建超级用户的时候无法退出的bug
1 parent 9ba7c40 commit a6e916c

File tree

13 files changed

+795
-58
lines changed

13 files changed

+795
-58
lines changed

fast_tmp/admin/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ async def login(
5959
context["password_err"] = True
6060
return templates.TemplateResponse("login.html", context)
6161
user = await User.filter(username=username).first()
62-
if not user or not user.verify_password(password) or not user.is_active:
62+
if not user or not user.check_password(password) or not user.is_active:
6363
context["errinfo"] = "username or password error!"
6464
return templates.TemplateResponse("login.html", context)
6565

fast_tmp/contrib/__init__.py

Whitespace-only changes.

fast_tmp/contrib/auth/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)