因为 is_authenticated是属性所以有如下做法
models中的三个def is_authenticated(self):
return True
def is_active(self):
return True
def is_anonymous(self):
return False
改成
dis_authenticated = True
is_active = True
is_anonymous = False
然后将其他地方的is_authenticated()括号去掉,完美解决