点进报错文件添加:print(app_label + " " + self.model_name_lower + " " + self.name,11111111111111)
报错:AttributeError: ‘NoneType’ object has no attribute ‘is_relation’
解决办法:根据输出信息,找到最后一个app,然后注释对应的行
如图我需要注释掉SendEmails app里迁移文件里包含
model_name=‘sendemail’,
name=‘status’ 相关的所有行——一次注释所有的
2报错:KeyError: (‘enterprise_qualification’, ‘cjbbasecompanyqualidata’)
解决办法:也是根据输出,找到对应app(我这是enterprise_qualification),注释掉迁移文件里所有关于cjbbasecompanyqualidata的所有行
3报错:CommandError: Conflicting migrations detected; multiple leaf nodes in the migration graph: (0024_auto_20220427_1351, 0009_sendemail_sendtype, 0018_auto_20211028_1446 in
SendEmails) 这个错误表示迁移文件冲突
解决办法:直接执行python manage.py makemigrations --merge命令