Django框架使用时候报type object 'BookInfo' has no attribute 'objects'

Django框架使用时候报type object 'BookInfo' has no attribute 'objects' 具体原因如下 models 具体原因如下 在django框架中模型models里面使用自定义管理,从而导致默认objects被替代了,所以会报错,还有一种就是写错了大家都知道 models 解决该错误的方法: 1.把books = BookInfoManager()注释掉
相关文章
相关标签/搜索