這裏是一個新手。我得到以下erorr:Django 1.8,無法運行manage.py
python manage.py migrate
Traceback (most recent call last):
File "manage.py", line 11, in <module>
execute_from_command_line(sys.argv)
File "//anaconda/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
utility.execute()
File "//anaconda/lib/python2.7/site-packages/django/core/management/__init__.py", line 328, in execute
django.setup()
File "//anaconda/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "//anaconda/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
app_config.import_models(all_models)
File "//anaconda/lib/python2.7/site-packages/django/apps/config.py", line 198, in import_models
self.models_module = import_module(models_module_name)
File "//anaconda/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "//anaconda/lib/python2.7/site-packages/app/models.py", line 61, in <module>
}[connection.vendor]
KeyError: 'unknown'
嘗試在運行後運行它:'python manage.py syncdb' – MYGz
@MohammadYusufGhazi syncdb在新版本的django中不存在,現在是「遷移」。 – Soviut
在進行遷移之前,您需要首先進行遷移。順便說一下,你有沒有更改settings.py文件中的數據庫設置? – shady