old_contents: import os
  
  basedir = os.path.abspath(os.path.dirname(__file__))
  
  if os.path.exists('config.env'):
      print('Importing environment from .env file')
      for line in open('config.env'):
          var = line.strip().split('=')
          if len(var) == 2:
              os.environ[var[0]] = var[1]
  
  
  class Config(object):
      APP_NAME = 'bucket-list'
      if os.environ.get('SECRET_KEY'):
          SECRET_KEY = os.environ.get('SECRET_KEY')
      else:
          SECRET_KEY = 'BUCKET_LIST_SECRET_KEY'
          print('SECRET KEY ENV VAR NOT SET! SHOULD NOT SEE IN PRODUCTION')
      SQLALCHEMY_COMMIT_ON_TEARDOWN = True
  
  
  class ProductionConfig(Config):
      SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \
          'sqlite:///' + os.path.join(basedir, 'prod_db.sqlite')
  
  
  class DevelopmentConfig(Config):
      DEBUG = True
      SQLALCHEMY_DATABASE_URI = os.environ.get('DEV_DATABASE_URL') or \
          'sqlite:///' + os.path.join(basedir, 'dev_db.sqlite')
      SQLALCHEMY_TRACK_MODIFICATIONS = False
      print('THIS APP IS IN DEBUG MODE. YOU SHOULD NOT SEE THIS IN PRODUCTION.')
  
  
  class TestingConfig(Config):
      TESTING = True
      SQLALCHEMY_DATABASE_URI = os.environ.get('TEST_DATABASE_URL') or \
          'sqlite:///' + os.path.join(basedir, 'test_db.sqlite')
  
  config = {
      'development': DevelopmentConfig,
      'testing': TestingConfig,
      'production': ProductionConfig,
      'default': DevelopmentConfig
  }
  
new_contents: import os
  
  basedir = os.path.abspath(os.path.dirname(__file__))
  
  if os.path.exists('config.env'):
      print('Importing environment from .env file')
      for line in open('config.env'):
          var = line.strip().split('=')
          if len(var) == 2:
              os.environ[var[0]] = var[1]
  
  
  class Config(object):
      APP_NAME = 'bucket-list'
      if os.environ.get('SECRET_KEY'):
          SECRET_KEY = os.environ.get('SECRET_KEY')
      else:
          SECRET_KEY = 'BUCKET_LIST_SECRET_KEY'
          print('SECRET KEY ENV VAR NOT SET! SHOULD NOT SEE IN PRODUCTION')
      SQLALCHEMY_COMMIT_ON_TEARDOWN = True
  
  
  class ProductionConfig(Config):
      SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \
          'sqlite:///' + os.path.join(basedir, 'prod_db.sqlite')
  
  
  class DevelopmentConfig(Config):
      DEBUG = True
      SQLALCHEMY_DATABASE_URI = os.environ.get('DEV_DATABASE_URL') or \
          'sqlite:///' + os.path.join(basedir, 'dev_db.sqlite')
      SQLALCHEMY_TRACK_MODIFICATIONS = False
      print('THIS APP IS IN DEBUG MODE. YOU SHOULD NOT SEE THIS IN PRODUCTION.')
  
  
  class TestingConfig(Config):
      TESTING = True
      SQLALCHEMY_TRACK_MODIFICATIONS = False
      SQLALCHEMY_DATABASE_URI = os.environ.get('TEST_DATABASE_URL') or \
          'sqlite:///' + os.path.join(basedir, 'test_db.sqlite')
  
  config = {
      'development': DevelopmentConfig,
      'testing': TestingConfig,
      'production': ProductionConfig,
      'default': DevelopmentConfig
  }
  
subject: Set track modifications to off during testing