Django model “doesn't declare an explicit app_label”

后端 未结 28 1975
無奈伤痛
無奈伤痛 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:17

    The issue is that:

    1. You have made modifications to your models file, but not addedd them yet to the DB, but you are trying to run Python manage.py runserver.

    2. Run Python manage.py makemigrations

    3. Python manage.py migrate

    4. Now Python manage.py runserver and all should be fine.

提交回复
热议问题