django makemigrations报错 5C

File "E:\python\shop\apps\trade\models.py", line 7, in
User = get_user_model()
File "C:\Python36-32\lib\site-packages\django-1.10.6-py3.6.egg\django\contrib\auth__init__.py", line 163, in get_user_model
return django_apps.get_model(settings.AUTH_USER_MODEL)
File "C:\Python36-32\lib\site-packages\django-1.10.6-py3.6.egg\django\apps\registry.py", line 192, in get_model
self.check_models_ready()
File "C:\Python36-32\lib\site-packages\django-1.10.6-py3.6.egg\django\apps\registry.py", line 131, in check_models_ready
raise AppRegistryNotReady("Models aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet.

1个回答

File "E:\python\shop\apps\trade\models.py", line 7, in
User = get_user_model()
检查这里的代码,根据错误信息,无法加载模型。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐