我在code_cloud
项目中有一个名为ccloud
的应用。
default_config = 'code_cloud.apps.CodeCloudConfig'
在code_cloud/__init__.py
以下是ccloud/settings.py
的相关部分:
INSTALLED_APPS = [
'code_cloud'
....
]
当我python manage.py makemigrations code_cloud
时,我得到了
....
ImportError: No module named 'code_clouddjango'
为什么django在搜索之前将django附加到模块。我有django版本1.9.2
答案 0 :(得分:2)
您可能错过了'code_cloud'
和'django'
之间的逗号,这导致字符串连接。
INSTALLED_APPS = [
'code_cloud'
'django',
...
]
应该是:
INSTALLED_APPS = [
'code_cloud',
'django',
...
]