old_contents: import os
  
  from django.conf import settings
  
  
  def configure_settings():
      """
      Configures settings for manage.py and for run_tests.py.
      """
      os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'settings')
  
      if not settings.configured:
          # Determine the database settings depending on if a test_db var is set in CI mode or not
          test_db = os.environ.get('DB', None)
          if test_db is None:
              db_config = {
                  'ENGINE': 'django.db.backends.postgresql_psycopg2',
                  'NAME': 'ambition',
                  'USER': 'ambition',
                  'PASSWORD': 'ambition',
                  'HOST': 'localhost',
                  'TEST': {
                      'CHARSET': 'UTF8',
                  }
              }
          elif test_db == 'postgres':
              db_config = {
                  'ENGINE': 'django.db.backends.postgresql_psycopg2',
                  'USER': 'postgres',
                  'NAME': 'entity',
              }
          else:
              raise RuntimeError('Unsupported test DB {0}'.format(test_db))
  
          installed_apps = [
              'django.contrib.auth',
              'django.contrib.contenttypes',
              'django.contrib.sessions',
              'django.contrib.admin',
              'entity',
              'entity.tests',
          ]
  
          settings.configure(
              TEST_RUNNER='django_nose.NoseTestSuiteRunner',
              NOSE_ARGS=['--nocapture', '--nologcapture', '--verbosity=1'],
              DATABASES={
                  'default': db_config,
              },
              MIDDLEWARE_CLASSES={},
              INSTALLED_APPS=installed_apps,
              ROOT_URLCONF='entity.urls',
              DEBUG=False,
              DDF_FILL_NULLABLE_FIELDS=False,
          )
  
new_contents: import os
  
  from django.conf import settings
  
  
  def configure_settings():
      """
      Configures settings for manage.py and for run_tests.py.
      """
      os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'settings')
  
      if not settings.configured:
          # Determine the database settings depending on if a test_db var is set in CI mode or not
          test_db = os.environ.get('DB', None)
          if test_db is None:
              db_config = {
                  'ENGINE': 'django.db.backends.postgresql_psycopg2',
                  'NAME': 'ambition',
                  'USER': 'ambition',
                  'PASSWORD': 'ambition',
                  'HOST': 'db',
                  'TEST': {
                      'CHARSET': 'UTF8',
                  }
              }
          elif test_db == 'postgres':
              db_config = {
                  'ENGINE': 'django.db.backends.postgresql_psycopg2',
                  'USER': 'postgres',
                  'NAME': 'entity',
              }
          else:
              raise RuntimeError('Unsupported test DB {0}'.format(test_db))
  
          installed_apps = [
              'django.contrib.auth',
              'django.contrib.contenttypes',
              'django.contrib.sessions',
              'django.contrib.admin',
              'entity',
              'entity.tests',
          ]
  
          settings.configure(
              TEST_RUNNER='django_nose.NoseTestSuiteRunner',
              NOSE_ARGS=['--nocapture', '--nologcapture', '--verbosity=1'],
              DATABASES={
                  'default': db_config,
              },
              MIDDLEWARE_CLASSES={},
              INSTALLED_APPS=installed_apps,
              ROOT_URLCONF='entity.urls',
              DEBUG=False,
              DDF_FILL_NULLABLE_FIELDS=False,
          )
  
subject: Revert settings file