Django model “doesn't declare an explicit app_label”

后端 未结 28 1977
無奈伤痛
無奈伤痛 2020-11-27 15:38

I\'m at wit\'s end. After a dozen hours of troubleshooting, probably more, I thought I was finally in business, but then I got:

Model class django.contrib.co         


        
28条回答
  •  情书的邮戳
    2020-11-27 16:09

    I got this error today and ended up here after googling. None of the existing answers seem relevant to my situation. The only thing I needed to do was to import a model from my __init__.py file in the top level of an app. I had to move my imports into the functions using the model.

    Django seems to have some weird code that can fail like this in so many different scenarios!

提交回复
热议问题