老师您好,我执行run manage.py task的时候 报了个导入错误
来源:3-3 django orm介绍与model设计
精慕门1599776
2018-05-17
Failed to get real commands on module "DemoDjango": python process died with code 1: Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/helpers/pycharm/_jb_manage_tasks_provider.py", line 25, in <module>
django.setup()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/__init__.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/apps/config.py", line 94, in create
module = import_module(entry)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named message
2回答
-
精慕门1599776
提问者
2018-05-17
老师,问题已经解决了 把message文件拉到根目录就没问题了,看来是没有找到apps下的message
012018-05-18 -
精慕门1599776
提问者
2018-05-17
是不是因为我把message放在了apps目录下 系统没有找到?但是我marked apps文件夹为source root了
012018-06-11
相似问题