标签:pytho djang path min enc python dep install span
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration admin.0001_initial is applied before its dependency users.0001_initial on database ‘default‘. 问题分析,在配置中设置了 AUTH_USER_MODEL = ‘user.User‘ (应用名.模型类名),扩展django自带的user认证.由于不是项目的第一次迁移,所以会产生此问题,解决方案如下: 注释掉两个地方: INSTALLED_APPS = [ ... #‘django.contrib.admin‘, ... ] path(‘admin/‘, admin.site.urls) 执行python manage.py migrate,解决! 取消注释后续makemigrations、migrate全部正常
标签:pytho djang path min enc python dep install span
原文地址:https://www.cnblogs.com/yum777/p/12995649.html