并且使用不存在的用户名登录时总是报错:
if not force and not user.is_active():
AttributeError: 'NoneType' object has no attribute 'is_active'
def is_active(self):
return True
代码就是参考flask-admin的auth例子写的。
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
走同样的路,发现不同的人生