The password and confidential information are stored in my case in the individual settings dev_settings.py and prod_settings.py both files are in .gitignore . In settings.py I can switch between them through the Environment as follows:
DEV_SETTINGS = '_XXXXX_' if os.environ.get('PROJECT_NAME_PROD', 'NO') == 'YES': from project.prod_settings import * else: from project.dev_settings import *
With this, you can still have your settings.py in the repository.
source share