【发布时间】:2015-01-01 11:14:24
【问题描述】:
我需要运行一个已经存在的 django 项目。
我安装了所有依赖项,运行了 syncdb,migrate。现在应用程序运行良好。但我想加载夹具,以便我可以使用示例数据测试应用程序。
我有三个文件 fixtures/first.json /fixtures/thing.yaml fixtures/good_email.yaml
当我运行 ./manage.py loaddata fixtures/good_email.yaml 时出现此错误。
IntegrityError: Problem installing fixture 'fixtures/good_email.yaml': Could not load
Myproject.MYclass(pk=78): columns kabal_id, email are not unique
我该如何解决这个问题,我不想重新生成灯具,但我需要对我的灯具进行一些修复。
【问题讨论】: