1π
So I managed to fix it myself, the problem was that I had
DATABASES['default'] = dj_database_url.config()
This was there. because I am using Heroku, so I removed this line and it worked, now the final settings.py file looks like that:
import dj_database_url
# Database
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
if DEBUG:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
'USER': '',
'PASSWORD': '',
'HOST': '',
'PORT': '',
}
}
else:
DATABASES = {'default': dj_database_url.config(default='postgres://localhost')}
You must remember to change the DEBUG variable value to False when you deploy.
π€victor175
0π
This will happen also with later versions. It happened with me for Django 2.2
Basically it happens because dj_database_url.config()
looks for DATABASE_URL
and defaults to the dummy engine when the URL isnβt found.
π€Lantern
- [Answer]-How to speed up sorting of django queryset?
- [Answer]-XML Rendering in DIV
- [Answer]-Queries in Django Models
- [Answer]-Django-generic-ratings installation gives error: No module named default
Source:stackexchange.com