old_contents: import os
  
  basedir = os.path.abspath(os.path.dirname(__file__)) + '/databases/'
  
  # --- import environment variables from hidden file
  if os.path.exists('.env'):
      print('Importing environment from .env...')
      for line in open('.env'):
          var = line.strip().split('=')
          if len(var) == 2:
              os.environ[var[0]] = var[1]
  
  
  class Config:
      SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string'
      SSL_DISABLE = True
  
      @staticmethod
      def init_app(app):
          pass
  
  
  class DevelopmentConfig(Config):
      DEBUG = True
      SERVERNAME='http://localhost'
      TEMPLATES_AUTO_RELOAD = True
  
  
  class ProductionConfig(Config):
      DEBUG = False
      SERVERNAME='http://shikigami.ad.bcm.edu'
      @classmethod
      def init_app(cls, app):
          Config.init_app(app)
  
  
  
  class HerokuConfig(ProductionConfig):
      SSL_DISABLE = bool(os.environ.get('SSL_DISABLE'))
  
      @classmethod
      def init_app(cls, app):
          ProductionConfig.init_app(app)
  
          # handle proxy server headers
          from werkzeug.contrib.fixers import ProxyFix
          app.wsgi_app = ProxyFix(app.wsgi_app)
  
          # log to stderr
          import logging
          from logging import StreamHandler
          file_handler = StreamHandler()
          file_handler.setLevel(logging.WARNING)
          app.logger.addHandler(file_handler)
  
  
  class UnixConfig(ProductionConfig):
      @classmethod
      def init_app(cls, app):
          ProductionConfig.init_app(app)
  
          # log to syslog
          import logging
          from logging.handlers import SysLogHandler
          syslog_handler = SysLogHandler()
          syslog_handler.setLevel(logging.WARNING)
          app.logger.addHandler(syslog_handler)
  
  
  config = {
      'development': DevelopmentConfig,
      'production': ProductionConfig,
      'heroku': HerokuConfig,
      'unix': UnixConfig,
      'default': DevelopmentConfig
  }
  
new_contents: import os
  
  basedir = os.path.abspath(os.path.dirname(__file__)) + '/databases/'
  
  # --- import environment variables from hidden file
  if os.path.exists('.env'):
      print('Importing environment from .env...')
      for line in open('.env'):
          var = line.strip().split('=')
          if len(var) == 2:
              os.environ[var[0]] = var[1]
  
  
  class Config:
      SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string'
      SSL_DISABLE = True
  
      @staticmethod
      def init_app(app):
          pass
  
  
  class DevelopmentConfig(Config):
      DEBUG = True
      SERVERNAME='http://localhost'
      TEMPLATES_AUTO_RELOAD = True
  
  
  class ProductionConfig(Config):
      DEBUG = True
      SERVERNAME='http://shikigami.ad.bcm.edu'
      @classmethod
      def init_app(cls, app):
          Config.init_app(app)
  
  
  
  class HerokuConfig(ProductionConfig):
      SSL_DISABLE = bool(os.environ.get('SSL_DISABLE'))
  
      @classmethod
      def init_app(cls, app):
          ProductionConfig.init_app(app)
  
          # handle proxy server headers
          from werkzeug.contrib.fixers import ProxyFix
          app.wsgi_app = ProxyFix(app.wsgi_app)
  
          # log to stderr
          import logging
          from logging import StreamHandler
          file_handler = StreamHandler()
          file_handler.setLevel(logging.WARNING)
          app.logger.addHandler(file_handler)
  
  
  class UnixConfig(ProductionConfig):
      @classmethod
      def init_app(cls, app):
          ProductionConfig.init_app(app)
  
          # log to syslog
          import logging
          from logging.handlers import SysLogHandler
          syslog_handler = SysLogHandler()
          syslog_handler.setLevel(logging.WARNING)
          app.logger.addHandler(syslog_handler)
  
  
  config = {
      'development': DevelopmentConfig,
      'production': ProductionConfig,
      'heroku': HerokuConfig,
      'unix': UnixConfig,
      'default': DevelopmentConfig
  }
  
subject: switch on debug