2013-08-16 29 views
-1

我使用django tutorial學習如何使用Django。無法使用Django教程解決以下錯誤 - 錯誤地配置:settings.DATABASES配置不正確

我無法解決此錯誤

ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details. 

此錯誤出現後,我鍵入

python manage.py syncdb 

正在使用Django的版本是1.5在CentOS

+0

請問您可以粘貼您的settings.py嗎? –

+0

那麼,你提供了ENGINE值嗎? –

回答

0

您需要在DATABASES設置在settings.py指定ENGINE值。可用的選項有

  • django.db.backends.postgresql_psycopg2
  • django.db.backends.mysql
  • django.db.backends.sqlite3
  • django.db.backends.oracle

您還可以指定一個自定義的後端。有關更多信息,請參閱django docs

0

也許你忘了如果使用postgresql或sqlite或mysql後端,請指定引擎名稱。

it's up to what kind of database you are using. 
for example for postgresql: 

DATABASES = { 
'default': { 
    'ENGINE': 'django.db.backends.postgresql_psycopg2', 
    # Add 'postgresql_psycopg2',  
    } 
相關問題