I\'m here because I\'m really really new with heroku-python-django-postgresql group. I have googled for a usage for dj-database-url and I don\'t understand why i have to use it
Use pip module dj-dtabase-url. Add an environmental var with the name 'DATABASE_URL' and the value from the heroku db settings.
Important, to avoid the error 'NameError: name 'DATABASES' is not defined.' You still have to leave for example the default DATABSE settings.
The complete code:
import dj_database_url
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'mydatabase',
}
}
DATABASES['default'] = dj_database_url.config()