执行python manage.py migrate命令时报错: ValueError: The field admin.LogEntry.user was declared with a lazy reference to 'app01.user', but app 'app01' isn't installed. 已经在settings.py中安装app01,但还是报错; 解决方法
执行python manage.py migrate命令时报错:
ValueError: The field admin.LogEntry.user was declared with a lazy reference to 'app01.user', but app 'app01' isn't installed.已经在settings.py中安装app01,但还是报错;
解决方法:找到自己的/python3X/lib/site-packages/django/contrib/admin/migrations文件夹,把里面除了__init__.py的所有文件,全部删了再migrate就可以了。(注意,切勿把__init__.py文件删了,也不要把contrib/contenttypes这个文件夹下的migrations删了,不然会导致migrate功能失效,像我就只能把django卸了重下)
————————————————
原文链接:https://blog.csdn.net/github_38854366/article/details/81015647