

def configure_settings():
    '\n    Configures settings for manage.py and for run_tests.py.\n    '
    logging.disable(logging.CRITICAL)
    if (not settings.configured):
        test_db = os.environ.get('DB', None)
        if (test_db is None):
            db_config = {
                'ENGINE': 'django.db.backends.postgresql_psycopg2',
                'NAME': 'ambition_dev',
                'USER': 'ambition_dev',
                'PASSWORD': 'ambition_dev',
                'HOST': 'localhost',
            }
        elif (test_db == 'postgres'):
            db_config = {
                'ENGINE': 'django.db.backends.postgresql_psycopg2',
                'USER': 'postgres',
                'NAME': 'entity_subscription',
            }
        elif (test_db == 'sqlite'):
            db_config = {
                'ENGINE': 'django.db.backends.sqlite3',
                'NAME': 'entity_subscription',
            }
        else:
            raise RuntimeError('Unsupported test DB {0}'.format(test_db))
        settings.configure(DATABASES={
            'default': db_config,
        }, INSTALLED_APPS=('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.admin', 'entity', 'south', 'entity_subscription', 'entity_subscription.tests'), ROOT_URLCONF='entity_subscription.urls', DEBUG=False)

dataset/ETHPy150Open ambitioninc/django-entity-subscription/settings.py configure_settings/original