从进行数据迁移的时候,报的错。
从comment/models.py 导入blog/models.py中的Post类。刚接触这个,上网查了整不懂。。。
查的一般都说工作目录下搜不到这个目录,求大神告知
下面是我的报错
(venv) C:\Users\hty11\PycharmProjects\typeidea\typeidea>python manage.py makemigrations
C:\Users\hty11\PycharmProjects\typeidea\typeidea
C:\Users\hty11\PycharmProjects\typeidea
C:\Users\hty11\AppData\Local\Programs\Python\Python38-32\python38.zip
C:\Users\hty11\AppData\Local\Programs\Python\Python38-32\DLLs
C:\Users\hty11\AppData\Local\Programs\Python\Python38-32\lib
C:\Users\hty11\AppData\Local\Programs\Python\Python38-32
C:\Users\hty11\PycharmProjects\typeidea\venv
C:\Users\hty11\PycharmProjects\typeidea\venv\lib\site-packages
C:\Users\hty11\PycharmProjects\typeidea\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg
C:\Users\hty11\PycharmProjects\typeidea\venv\lib\site-packages\pip-19.0.3-py3.8.egg
C:\Users\hty11\PycharmProjects\typeidea\typeidea\blog\models.py
Traceback (most recent call last):
File "manage.py", line 24, in
main()
File "manage.py", line 20, in main
execute_from_command_line(sys.argv)
File "C:\Users\hty11\PycharmProjects\typeidea\venv\lib\site-packages\django\core\management__init__.py", line 381, in execute_from_command_line
utility.execute()
File "C:\Users\hty11\PycharmProjects\typeidea\venv\lib\site-packages\django\core\management__init__.py", line 357, in execute
django.setup()
File "C:\Users\hty11\PycharmProjects\typeidea\venv\lib\site-packages\django__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Users\hty11\PycharmProjects\typeidea\venv\lib\site-packages\django\apps\registry.py", line 114, in populate
app_config.import_models()
File "C:\Users\hty11\PycharmProjects\typeidea\venv\lib\site-packages\django\apps\config.py", line 211, in import_models
self.models_module = import_module(models_module_name)
File "C:\Users\hty11\AppData\Local\Programs\Python\Python38-32\lib\importlib__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "C:\Users\hty11\PycharmProjects\typeidea\typeidea\comment\models.py", line 7, in
from typeidea.blog.models import Post
ModuleNotFoundError: No module named 'typeidea.blog'
C:\Users\hty11\PycharmProjects\typeidea\typeidea
C:\Users\hty11\PycharmProjects\typeidea
C:\Users\hty11\AppData\Local\Programs\Python\Python38-32\python38.zip
C:\Users\hty11\AppData\Local\Programs\Python\Python38-32\DLLs
C:\Users\hty11\AppData\Local\Programs\Python\Python38-32\lib
C:\Users\hty11\AppData\Local\Programs\Python\Python38-32
C:\Users\hty11\PycharmProjects\typeidea\venv
C:\Users\hty11\PycharmProjects\typeidea\venv\lib\site-packages
C:\Users\hty11\PycharmProjects\typeidea\venv\lib\site-packages\setuptools-40.8.0-py3.8.egg
C:\Users\hty11\PycharmProjects\typeidea\venv\lib\site-packages\pip-19.0.3-py3.8.egg
C:\Users\hty11\PycharmProjects\typeidea