There are many ways to manage different development / development environments.
One of them is to have a local settings file, which is imported at the bottom of your settings file, which is not in version control, and therefore not in the hero.
Another is any way to distinguish a heroku environment from your local environment. For example, an arbitrary environment variable.
Another, the default argument is passed to dj_database_url , which basically does this simple if for you.
import dj_database_url DATABASES['default'] = dj_database_url.config( default='sqlite:////path-to-my/database.sqlite')
Remember that this settings file is just python. For example, you could use one database on Tuesday, for example, any action you can think of will work.
source share