django.db.migrations.exceptions.InconsistentMigrationHistory

后端 未结 25 1178
耶瑟儿~
耶瑟儿~ 2020-12-04 08:16

When I run python manage.py migrate on my Django project, I get the following error:

Traceback (most recent call last):
File \"manage.py\", line         


        
25条回答
  •  猫巷女王i
    2020-12-04 09:17

    Since you are using a custom User model, you can first comment out

    INSTALLED_APPS = [
    ...
    #'django.contrib.admin',
    ...
    ]
    

    in your Installed_Apps settings. Then run

    python manage.py migrate.
    

    When done uncomment

    'django.contrib.admin'
    

提交回复
热议问题