老师,看不懂这个报错是外键哪里出了问题?对过一遍源码也没找出来。
以下为详细报错信息:
_mysql.connection.query(self, query)
django.db.utils.IntegrityError: (1452, ‘Cannot add or update a child row: a foreign key constraint fails (djangostart
.django_admin_log
, CONSTRAINT django_admin_log_user_id_c564eba6_fk_auth_user_id
FOREIGN KEY (user_id
) REFERENCES auth_user
(id
))’)
[16/Apr/2019 16:36:51] “POST /admin/user/userprofile/add/ HTTP/1.1” 500 221213