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