2013-08-16 23 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',  
    } 
相关问题