原文:Model class apps.goods.models.GoodsType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS

在admin.py注册这个model时,报了个错: admin是这样写的: 已经把多个应用放到一个文件夹apps,然后在settings也有注册 apps的路径也添加进来了 然后仔细看admin的写法,感觉不太对,把apps去掉就正常了,因为在settings已经添加过这个路径了,所以此时只要从具体的app名导入就好 ...

2020-04-29 20:27 0 596 推荐指数:

查看详情

 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM