在使用if request.user.is_authenticated():出现错误,因为我是用的是django3.2,is_authenticated在django3.1版本以上都是属性,不是方法。改为if request.user.is_authenticated即可。
if request.user.is_authenticated(): TypeError: ‘bool‘ object is not callable
在使用if request.user.is_authenticated():出现错误,因为我是用的是django3.2,is_authenticated在django3.1版本以上都是属性,不是方法。改为if request.user.is_authenticated即可。
if request.user.is_authenticated(): TypeError: ‘bool‘ object is not callable