#ProgrammingError at /relation "django_session" does not existLINE 1: ...essio

27 messages · Page 1 of 1 (latest)

final idol
#

I'm getting the error above, i tried to run python manage.py migrate on the terminal cpane, i also get the error message: raise ImproperlyConfigured("settings.DATABASES is improperly configured. "
django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details. I have tried to find solution on google, but nothing works.

young mountain
#

Can you post your DATABASES settings?

final idol
#

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': os.getenv('POSTGRES_DB'),
'USER': os.getenv('POSTGRES_USER'),
'PASSWORD': os.getenv('POSTGRES_PASSWORD'),
'HOST': '127.0.0.1',
'PORT': '5432',
}
}

#

I put the correct environment variables on cpanel. I even confirmed if the variables i put were working by trying to connect to the database on cpanel terminal and that was successful. So am not very sure where the problem is now. I don't know why am getting that error

wispy stream
#

Well, your ENGINE settings is hardcoded, so if it complains about it - first explanation I have - you are not running this code in the first place

#

Like it's not pulled, not reloaded or lately overriden

young mountain
#

if you have access to a terminal, I suggest running the following:

$ python manage.py shell
>>> from django.conf import settings
>>> print(settings.DATABASES)
#

If that doesn't show the expected values, then as GinFuyou said, it's likely not pulled or otherwise.

final idol
final idol
#

Though my settings are in a folder called settings. And the file i assigned to be used is in prod.py. I have three files in my settings. prod.py, base.py and local .py

young mountain
#

Plot thickens!

#

Can you post your project online? Github or otherwise

final idol
wispy stream
#

so this is another issues with split files settings.

final idol
#

But at first it was working with only wsgi.py file edited. Now i had to edit the other files too.

#

Though that happened after namecheap cpanel did some update to there servers. Am not sure though

wispy stream
#

split file settings supposed to use env var I think?

#

Anyway, a method I hate considerably, ugly and hard to use

final idol
#

It's not very hard. It saves time

wispy stream
#

disagreed