windows环境下python manage.py loaddata init.json不成功
Bluetooth503 opened this issue · 2 comments
Bluetooth503 commented
python manage.py loaddata init.json不成功,出现以下错误.
"sqlite3.IntegrityError: UNIQUE constraint failed: django_content_type.app_label, django_content_type.model"
"django.db.utils.IntegrityError: Problem installing fixture 'D:\surveySystem-master\init.json': Could not load contenttypes.ContentType(pk=8): UNIQUE constraint failed: django_content_type.app_label, django_content_type.model"
接着执行:python manage.py runserver 0.0.0.0:8023,用root/root23456无法登陆.
csrftoken commented
把数据库里面的数据全部都删除掉
csrftoken commented
然后在进行初始化数据