Django | pycharm 提示 unresolved attribute referene 'objects' for class 'xxxx'

objects高亮,提示信息为unresolved attribute referene 'objects' for class 'BookInfo'

当前情况是pycharm没有识别到objects,并不会影响程序运行

只需要在BookInfo 模型类中的 字段同一级,加入如下代码,即可

objects = models.Manager()

猜你喜欢

转载自www.cnblogs.com/ykit/p/11971580.html