TypeError: 'bool' object is not callable
来源:互联网 发布:聊城行知中学 编辑:程序博客网 时间:2024/06/05 03:28
因为 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()括号去掉,完美解决
阅读全文
0 0
- TypeError: 'bool' object is not callable
- TypeError: 'str' object is not callable
- TypeError: 'sip.methoddescriptor' object is not callable
- TypeError: 'str' object is not callable
- TypeError: 'module' object is not callable
- TypeError: 'str' object is not callable
- TypeError: 'tuple' object is not callable
- TypeError: 'str' object is not callable
- TypeError:'dict' object is not callable
- TypeError: 'str' object is not callable
- TypeError: 'str' object is not callable
- TypeError: 'str' object is not callable
- TypeError: 'str' object is not callable
- Python:TypeError: 'int' object is not callable
- TypeError: 'str' object is not callable
- TypeError: 'bytes' object is not callable解决办法
- TypeError: 'module' object is not callable
- Python: TypeError: 'int' object is not callable
- 安装PyInstaller失败
- 字母转换 进栈出栈
- Android O Doze模式的状态
- springmvc跳转不能获取静态资源
- IDEA Spring-Boot没有JSP
- TypeError: 'bool' object is not callable
- 使用mybatis-generator自动生成实体类,接口实现类和Mapper映射配置文件
- Java导出excel文件简单实现
- C语言实验——圆周率
- Linux——高性能服务器编程——select&poll&epoll
- 线程的一些入门知识
- 能实现把一个数组元素中的奇数放左边,偶数放右边
- 电路实验
- codeforces -891B Gluttony 排列,构造题