Unable to resolve following error using Django tutorial - ImproperlyConfigured: settings.DATABASES is improperly configured

StackOverflow https://stackoverflow.com/questions/18266834

  •  24-06-2022
  •  | 
  •  

문제

I'm using the django tutorial for learning how to use Django.

I'm unable to resolve this error

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

This error comes up after I type

python manage.py syncdb

The django version being used is 1.5 on CentOS

도움이 되었습니까?

해결책

You need to specify ENGINE value in DATABASES setting in your settings.py. The available options are

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

You can also specify a custom backend. Refer django docs for more information.

다른 팁

maybe you forgot to specify your engine name if using postgresql or sqlite or mysql backends.

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',      
     }
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top