为什么我在app下面的views中写入from .models import UserMessage整个django项目都报错了
错误如下
Traceback (most recent call last):
File "D:/websit/manage.py", line 4, in <module>
from message import views
File "D:\websit\message\views.py", line 3, in <module>
from .models import UserMessage
File "D:\websit\message\models.py", line 6, in <module>
class UserMessage(models.Model):
File "C:\Users\firerian\Envs\scrapytest\lib\site-packages\django\db\models\base.py", line 110, in __new__
app_config = apps.get_containing_app_config(module)
File "C:\Users\firerian\Envs\scrapytest\lib\site-packages\django\apps\registry.py", line 247, in get_containing_app_config
self.check_apps_ready()
File "C:\Users\firerian\Envs\scrapytest\lib\site-packages\django\apps\registry.py", line 125, in check_apps_ready
raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.