Exception Value:'bool' object is not callable

Exception Value:‘bool’ object is not callable 错误如下图: 错误原因:is_authenticated是属性而不是方法,把括号去掉就可以了 if request.user.is_authenticated():修改为if request.user.is_authenticated:解决如图:
相关文章
相关标签/搜索