并且使用不存在的用户名登录时总是报错:
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例子写的。
并且使用不存在的用户名登录时总是报错:
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例子写的。
2 回答5.1k 阅读✓ 已解决
2 回答1.1k 阅读✓ 已解决
4 回答966 阅读✓ 已解决
3 回答1.1k 阅读✓ 已解决
3 回答1.2k 阅读✓ 已解决
1 回答1.7k 阅读✓ 已解决
1 回答1.2k 阅读✓ 已解决