old_contents: import os
  
  _basedir = os.path.abspath(os.path.dirname(__file__))
  
  
  class BaseConfiguration(object):
      DEBUG = False
      TESTING = False
  
      ADMINS = frozenset(['youremail@yourdomain.com'])
      SECRET_KEY = 'SecretKeyForSessionSigning'
  
      THREADS_PER_PAGE = 8
  
      DATABASE = 'app.db'
      DATABASE_PATH = os.path.join(_basedir, DATABASE)
      SQLALCHEMY_DATABASE_URI = 'sqlite:///' + DATABASE_PATH
  
      SECURITY_REGISTERABLE = True
      SECURITY_TRACKABLE = True
  
  
  class TestConfiguration(BaseConfiguration):
      TESTING = True
  
      DATABASE = 'tests.db'
      DATABASE_PATH = os.path.join(_basedir, DATABASE)
      SQLALCHEMY_DATABASE_URI = 'sqlite:///:memory:'  # + DATABASE_PATH
  
  
  class DebugConfiguration(BaseConfiguration):
      DEBUG = True
  
new_contents: import os
  
  basedir = os.path.abspath(os.path.dirname(__file__))
  
  
  class BaseConfiguration(object):
      DEBUG = False
      TESTING = False
  
      ADMINS = frozenset(['youremail@yourdomain.com'])
      SECRET_KEY = 'SecretKeyForSessionSigning'
  
      THREADS_PER_PAGE = 8
  
      DATABASE = 'app.db'
      DATABASE_PATH = os.path.join(basedir, DATABASE)
      SQLALCHEMY_DATABASE_URI = 'sqlite:///' + DATABASE_PATH
  
      SECURITY_REGISTERABLE = True
      SECURITY_TRACKABLE = True
  
  
  class TestConfiguration(BaseConfiguration):
      TESTING = True
  
      DATABASE = 'tests.db'
      DATABASE_PATH = os.path.join(basedir, DATABASE)
      SQLALCHEMY_DATABASE_URI = 'sqlite:///:memory:'  # + DATABASE_PATH
  
  
  class DebugConfiguration(BaseConfiguration):
      DEBUG = True
  
subject: rename _basedir to basedir