Skip to content Skip to sidebar Skip to footer

Getting Database Is Improperly Configured .please Supply The Name Value Error

I come across this question settings.DATABASES is improperly configured. Please supply the NAME value but it doesn't worked for me. On applying python manage.py makemigrations,I am

Solution 1:

It sounds like your environment variable(s) in production may not be set -- I suspect this is what's happening.

Log into your production server(s) and ensure that your Django process has access to RDS_DB_NAME, RDS_USERNAME, etc. as environment variables.

ALSO: If you're having problems, you might want to try hard-coding fake credentials instead of using environment variables. This will at least get you to the next error, which should say invalid credentials or something similar. This will confirm that environment variables are the issue and need to be fixed.

UPDATE: If you want to try hardcoding credentials, do something like this for your production database config:

DATABASES = {
    'default': {
    'ENGINE': 'django.db.backends.postgresql_psycopg2',
    'NAME': 'test',
    'USER': 'test',
    'PASSWORD': 'test',
    'HOST': 'localhost',
    'PORT': 5432,
  }
}

This will 'hardcode' your fake credentials. You can then deploy this application and see what error you're getting.

Post a Comment for "Getting Database Is Improperly Configured .please Supply The Name Value Error"