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.
#ProgrammingError at /relation "django_session" does not existLINE 1: ...essio
27 messages · Page 1 of 1 (latest)
Can you post your DATABASES settings?
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
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
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.
from django.conf import settings
print(settings.DATABASES)
{}
This is what am getting lol. I gues that is not what to expect. So what can i do about it?
Plot thickens!
Can you post your project online? Github or otherwise
And base.py while you're at it
Use dpaste.org
They don't. I never did
so this is another issues with split files settings.
Maybe
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
Sounds like a bad practice
split file settings supposed to use env var I think?
Anyway, a method I hate considerably, ugly and hard to use
It's not very hard. It saves time
disagreed