old_contents: import os
  basedir = os.path.abspath(os.path.dirname(__file__))
  
  
  class Config:
      SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string'
      SQLALCHEMY_COMMIT_ON_TEARDOWN = True
      SQLALCHEMY_TRACK_MODIFICATIONS = False
      SSL_DISABLE = True
  
      MAIL_SERVER = 'smtp.googlemail.com'
      MAIL_PORT = 587
      MAIL_USE_TLS = True
      MAIL_USERNAME = os.environ.get('MAIL_USERNAME')
      MAIL_PASSWORD = os.environ.get('MAIL_PASSWORD')
      LABSYS_ADMIN = os.environ.get('LABSYS_ADMIN')
      LABSYS_MAIL_SUBJECT_PREFIX = '[LabSys]'
      LABSYS_MAIL_SENDER = 'LabSys Admin <gabrielcrsaldanha@gmail.com>'
  
      BOOTSTRAP_SERVE_LOCAL = True
  
      @staticmethod
      def init_app(app):
          pass
  
  
  class DevelopmentConfig(Config):
      DEBUG = True
      BOOTSTRAP_SERVE_LOCAL = True
      SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \
          'sqlite:///' + os.path.join(basedir, 'data-dev.sqlite')
  
  
  class TestingConfig(Config):
      TESTING = True
      BOOTSTRAP_SERVE_LOCAL = True
      SQLALCHEMY_DATABASE_URI = os.environ.get('TEST_DATABASE_URL') or \
          'sqlite:///' + os.path.join(basedir, 'data-test.sqlite')
      WTF_CSRF_ENABLED = False
  
  
  class ProductionConfig(Config):
      BOOTSTRAP_SERVE_LOCAL = True
      SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \
          'sqlite:///' + os.path.join(basedir, 'data.sqlite')
  
  
  class HerokuConfig(ProductionConfig):
      BOOTSTRAP_SERVE_LOCAL = False
      SSL_DISABLE = bool(os.environ.get('SSL_DISABLE'))
  
      @classmethod
      def init_app(cls, app):
          ProductionConfig.init_app(app)
  
          # handle proxy server headers (necessary in any reverse proxy server)
          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)
  
  
  config = {
      'development': DevelopmentConfig,
      'testing': TestingConfig,
      'production': ProductionConfig,
      'heroku': HerokuConfig,
      'default': DevelopmentConfig
  }
  
new_contents: import os
  basedir = os.path.abspath(os.path.dirname(__file__))
  
  
  class Config:
      SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string'
      SQLALCHEMY_COMMIT_ON_TEARDOWN = True
      SQLALCHEMY_TRACK_MODIFICATIONS = False
      SSL_DISABLE = True
  
      MAIL_SERVER = 'smtp.googlemail.com'
      MAIL_PORT = 587
      MAIL_USE_TLS = True
      MAIL_USERNAME = os.environ.get('MAIL_USERNAME')
      MAIL_PASSWORD = os.environ.get('MAIL_PASSWORD')
      LABSYS_ADMIN = os.environ.get('LABSYS_ADMIN')
      LABSYS_MAIL_SUBJECT_PREFIX = '[LabSys]'
      LABSYS_MAIL_SENDER = 'LabSys Admin <gabrielcrsaldanha@gmail.com>'
  
      BOOTSTRAP_SERVE_LOCAL = True
  
      @staticmethod
      def init_app(app):
          pass
  
  
  class DevelopmentConfig(Config):
      DEBUG = True
      BOOTSTRAP_SERVE_LOCAL = True
      SQLALCHEMY_DATABASE_URI = os.environ.get('DEV_DATABASE_URL') or \
          'sqlite:///' + os.path.join(basedir, 'data-dev.sqlite')
  
  
  class TestingConfig(Config):
      TESTING = True
      BOOTSTRAP_SERVE_LOCAL = True
      SQLALCHEMY_DATABASE_URI = os.environ.get('TEST_DATABASE_URL') or \
          'sqlite:///' + os.path.join(basedir, 'data-test.sqlite')
      WTF_CSRF_ENABLED = False
  
  
  class ProductionConfig(Config):
      BOOTSTRAP_SERVE_LOCAL = True
      SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \
          'sqlite:///' + os.path.join(basedir, 'data.sqlite')
  
  
  class HerokuConfig(ProductionConfig):
      BOOTSTRAP_SERVE_LOCAL = False
      SSL_DISABLE = bool(os.environ.get('SSL_DISABLE'))
  
      @classmethod
      def init_app(cls, app):
          ProductionConfig.init_app(app)
  
          # handle proxy server headers (necessary in any reverse proxy server)
          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)
  
  
  config = {
      'development': DevelopmentConfig,
      'testing': TestingConfig,
      'production': ProductionConfig,
      'heroku': HerokuConfig,
      'default': DevelopmentConfig
  }
  
subject: Use DEV_DATABASE_URL instead of DATABASE_URL for development environment