old_contents: # This file is exec'd from settings.py, so it has access to and can
  # modify all the variables in settings.py.
  
  # If this file is changed in development, the development server will
  # have to be manually restarted because changes will not be noticed
  # immediately.
  import os
  import dotenv
  
  BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  
  # pull env variables from .env
  env_file = os.path.join(BASE_DIR, '.env')
  dotenv.read_dotenv(env_file)
  
  DEBUG = int(os.environ.get('DEBUG', 0))
  JS_DEBUG = int(os.environ.get('JS_DEBUG', 0))
  
  IN_DEV = int(os.environ.get('IN_DEV', 0))
  
  # Make these unique, and don't share it with anybody.
  SECRET_KEY = os.environ.get('SECRET_KEY')
  NEVERCACHE_KEY = os.environ.get('NEVERCACHE_KEY')
  
  DATABASES = {
      "default": {
          # Ends with "postgresql_psycopg2", "mysql", "sqlite3" or "oracle".
          "ENGINE": "django.db.backends.mysql",
          "NAME": os.environ.get('DB_NAME'),
          "USER": os.environ.get('DB_USER_NAME'),
          "PASSWORD": os.environ.get('DB_PASSWORD'),
          "HOST": os.environ.get('DB_HOST'),
          "PORT": os.environ.get('DB_PORT'),
      }
  }
  
  ###################
  # DEPLOY SETTINGS #
  ###################
  
  # Domains for public site
  ALLOWED_HOSTS = ["127.0.0.1"]
  
  # These settings are used by the default fabfile.py provided.
  # Check fabfile.py for defaults.
  
  # FABRIC = {
  #     "DEPLOY_TOOL": "rsync",  # Deploy with "git", "hg", or "rsync"
  #     "SSH_USER": "",  # VPS SSH username
  #     "HOSTS": [""],  # The IP address of your VPS
  #     "DOMAINS": ALLOWED_HOSTS,  # Edit domains in ALLOWED_HOSTS
  #     "REQUIREMENTS_PATH": "requirements.txt",  # Project's pip requirements
  #     "LOCALE": "en_US.UTF-8",  # Should end with ".UTF-8"
  #     "DB_PASS": "",  # Live database password
  #     "ADMIN_PASS": "",  # Live admin user password
  #     "SECRET_KEY": SECRET_KEY,
  #     "NEVERCACHE_KEY": NEVERCACHE_KEY,
  # }
  
new_contents: # This file is exec'd from settings.py, so it has access to and can
  # modify all the variables in settings.py.
  
  # If this file is changed in development, the development server will
  # have to be manually restarted because changes will not be noticed
  # immediately.
  import os
  import dotenv
  
  BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  
  # pull env variables from .env
  env_file = os.path.join(BASE_DIR, '.env')
  dotenv.read_dotenv(env_file)
  
  DEBUG = int(os.environ.get('DEBUG', 0))
  JS_DEBUG = int(os.environ.get('JS_DEBUG', 0))
  
  IN_DEV = int(os.environ.get('IN_DEV', 0))
  
  # Make these unique, and don't share it with anybody.
  SECRET_KEY = os.environ.get('SECRET_KEY')
  NEVERCACHE_KEY = os.environ.get('NEVERCACHE_KEY')
  
  DATABASES = {
      "default": {
          # Ends with "postgresql_psycopg2", "mysql", "sqlite3" or "oracle".
          "ENGINE": "django.db.backends.mysql",
          "NAME": os.environ.get('DB_NAME'),
          "USER": os.environ.get('DB_USER_NAME'),
          "PASSWORD": os.environ.get('DB_PASSWORD'),
          "HOST": os.environ.get('DB_HOST'),
          "PORT": os.environ.get('DB_PORT'),
      }
  }
  
  ###################
  # DEPLOY SETTINGS #
  ###################
  
  # Domains for public site
  ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS')
  if ALLOWED_HOSTS:
      ALLOWED_HOSTS = ALLOWED_HOSTS.split(',')
  else:
      ALLOWED_HOSTS = ['127.0.0.1']
  
  # These settings are used by the default fabfile.py provided.
  # Check fabfile.py for defaults.
  
  # FABRIC = {
  #     "DEPLOY_TOOL": "rsync",  # Deploy with "git", "hg", or "rsync"
  #     "SSH_USER": "",  # VPS SSH username
  #     "HOSTS": [""],  # The IP address of your VPS
  #     "DOMAINS": ALLOWED_HOSTS,  # Edit domains in ALLOWED_HOSTS
  #     "REQUIREMENTS_PATH": "requirements.txt",  # Project's pip requirements
  #     "LOCALE": "en_US.UTF-8",  # Should end with ".UTF-8"
  #     "DB_PASS": "",  # Live database password
  #     "ADMIN_PASS": "",  # Live admin user password
  #     "SECRET_KEY": SECRET_KEY,
  #     "NEVERCACHE_KEY": NEVERCACHE_KEY,
  # }
  
subject: fix allowed_hosts for production