本文主要是介绍RuntimeError:Model xx doesn‘t declare an explicit app_label and isn‘t in an application in INSTALLED,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
解决RuntimeError: Model class apps.books.models.Book doesn’t declare an explicit app_label and isn’t in an application in INSTALLED_APPS
首先apps是mark directory as source root
INSTALLED_APPS也注册了子应用
需要把设计books导入地方的apps.删掉就不会报错了
这篇关于RuntimeError:Model xx doesn‘t declare an explicit app_label and isn‘t in an application in INSTALLED的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!