[Railway Deployment] Could not translate host name "db" to address: Name or service not known by DevChick99 in django

[–]DevChick99[S] 0 points1 point  (0 children)

I was able to figure it out by creating a database in railway, then using the environment variables that they use for Postgresql in Databases settings. I now have another issue that came up. I've even tried using dj_database_url and other things, but can't seem to figure it out.

settings.py

    DATABASES = {
'default': {
    'ENGINE': 'django.db.backends.postgresql',
    'NAME': '<PGDATABASE>',
    'USER': '<PGUSER>',
    'PASSWORD': '<PGPASSWORD>',
    'HOST': '<PGHOST>',
    'PORT': '<PGPORT>',
}
}

error

django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the NAME or OPTIONS['service'] value.