1. 程式人生 > >apps導包錯誤

apps導包錯誤

報錯資訊:

RuntimeError: Model class apps.users.models.User doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

在列印控制定位到出錯程式碼位置:

 在導包時使用了apps

 

在setting中apps已經新增到了搜尋路徑中了,導包的時候不需要再新增apps只需要如下導包即可

from users.models import User