django.db.utils.OperationalError: (1824, “Failed to open the referenced table ‘blog_userinfo’”)
项目配置
Django == 3.2.6
PyMySQL == 1.0.2
MySQL == 8.0.26
报错分析:
此表是对user 以及abstractuser的继承,从报错来看是无法识别model中的数据字段,也就是blog_userinfo
解决措施:
在项目aap:blog中添加migrations 以及其中的__init__.py文件,具体项目结构如下: