RuntimeError: Model class app_anme.models.User doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.---python學習錯誤記錄


untimeError: Model class app_anme.models.User doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

 

關於django錯誤的導入錯誤

1.錯誤的導入方式如下:

 

2.正確的導入方式:

只有使用users.models的導入方式才能導入成功,使用絕對路徑也不行。

ps:如有大神知道原因請告知,不勝感謝!

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM