I have a flask application that uses different configuration files for development and production environments. The relevant piece of code is this:
app.conf
You should use a env variable to look if you are in dev or heroku.
env variable
heroku config:set IS_HEROKU=True
Then in your file
import os is_prod = os.environ.get('IS_HEROKU', None) if is_prod: #here goes all your heroku config