if not force and not user.is_active:
AttributeError: type object 'User' has no attribute 'is_active'
原来是User类没有继承UserMixin
from flask_login import UserMixin class User(UserMixin,db.Model):
if not force and not user.is_active:
AttributeError: type object 'User' has no attribute 'is_active'
原来是User类没有继承UserMixin
from flask_login import UserMixin class User(UserMixin,db.Model):