surveySystem icon indicating copy to clipboard operation
surveySystem copied to clipboard

windows环境下python manage.py loaddata init.json不成功

Open Bluetooth503 opened this issue 4 years ago • 2 comments

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无法登陆.

Bluetooth503 avatar May 07 '20 09:05 Bluetooth503

把数据库里面的数据全部都删除掉

csrftoken avatar May 07 '20 09:05 csrftoken

然后在进行初始化数据

csrftoken avatar May 07 '20 09:05 csrftoken