与flask-login实现登录密码相关问题求助,,flask-admin中


flask-admin中使用flask-login实现登录,但是登录时任意密码都可以登陆。

并且使用不存在的用户名登录时总是报错:
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例子写的。

编橙之家文章,

评论关闭