我正在尝试在新的Django 1.9项目上运行新的迁移,但我收到的ImportError似乎与 runserver 冲突。我正在从< project>运行这些命令。包含manage.py文件的目录。
详细说明:
命令&错误:
$ django-admin.py migrate --settings=config.settings.local
.....
ImportError: No module named config.settings.local
$ python manage.py runserver
Performing system checks...
System check identified no issues (0 silenced).
You have unapplied migrations; your app may not work properly until they are applied.
Run 'python manage.py migrate' to apply them.
January 09, 2016 - 13:33:32
Django version 1.9, using settings 'config.settings.local'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
有什么想法吗?提前致谢!
答案 0 :(得分:2)
使用manage.py
代替django-admin.py
python manage.py migrate --settings=config.settings.local