old_contents: """
  Django settings for the admin project.
  """
  
  import os
  from urlparse import urlparse
  from website import settings as osf_settings
  
  BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
  # Quick-start development settings - unsuitable for production
  # See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
  
  # SECURITY WARNING: keep the secret key used in production secret!
  SECRET_KEY = osf_settings.SECRET_KEY
  
  # TODO: generalize this authentication
  AUTHENTICATION_BACKENDS = (
      'api.base.authentication.backends.ODMBackend',
  )
  
  # SECURITY WARNING: don't run with debug turned on in production!
  DEBUG = osf_settings.DEBUG_MODE
  
  ALLOWED_HOSTS = [
      '.osf.io'
  ]
  
  # Application definition
  
  INSTALLED_APPS = (
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.staticfiles',
  
      # 3rd party
      'corsheaders',
      'raven.contrib.django.raven_compat',
  )
  
  # TODO: Are there more granular ways to configure reporting specifically related to the API?
  RAVEN_CONFIG = {
      'dsn': osf_settings.SENTRY_DSN
  }
  
  # Settings related to CORS Headers addon: allow API to receive authenticated requests from OSF
  # CORS plugin only matches based on "netloc" part of URL, so as workaround we add that to the list
  CORS_ORIGIN_ALLOW_ALL = False
  CORS_ORIGIN_WHITELIST = (urlparse(osf_settings.DOMAIN).netloc,
                           osf_settings.DOMAIN,
                           )
  CORS_ALLOW_CREDENTIALS = True
  
  MIDDLEWARE_CLASSES = (
      # TokuMX transaction support
      # Needs to go before CommonMiddleware, so that transactions are always started,
      # even in the event of a redirect. CommonMiddleware may cause other middlewares'
      # process_request to be skipped, e.g. when a trailing slash is omitted
      'api.base.middleware.DjangoGlobalMiddleware',
      'api.base.middleware.TokuTransactionsMiddleware',
  
      # 'django.contrib.sessions.middleware.SessionMiddleware',
      'corsheaders.middleware.CorsMiddleware',
      'django.middleware.common.CommonMiddleware',
      'django.middleware.csrf.CsrfViewMiddleware',
      # 'django.contrib.auth.middleware.AuthenticationMiddleware',
      # 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
      # 'django.contrib.messages.middleware.MessageMiddleware',
      'django.middleware.clickjacking.XFrameOptionsMiddleware',
      'django.middleware.security.SecurityMiddleware',
  
  )
  
  TEMPLATES = [
      {
          'BACKEND': 'django.template.backends.django.DjangoTemplates',
          'DIRS': [os.path.join(BASE_DIR, 'templates')],
          'APP_DIRS': True
      }]
  
  
  ROOT_URLCONF = 'admin.base.urls'
  WSGI_APPLICATION = 'api.base.wsgi.application'
  
  
  LANGUAGE_CODE = 'en-us'
  
new_contents: """
  Django settings for the admin project.
  """
  
  import os
  from urlparse import urlparse
  from website import settings as osf_settings
  
  BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
  # Quick-start development settings - unsuitable for production
  # See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
  
  # SECURITY WARNING: keep the secret key used in production secret!
  SECRET_KEY = osf_settings.SECRET_KEY
  
  # TODO: generalize this authentication
  AUTHENTICATION_BACKENDS = (
      'api.base.authentication.backends.ODMBackend',
  )
  
  # SECURITY WARNING: don't run with debug turned on in production!
  DEBUG = osf_settings.DEBUG_MODE
  
  ALLOWED_HOSTS = [
      '.osf.io'
  ]
  
  # Application definition
  
  INSTALLED_APPS = (
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.staticfiles',
  
      # 3rd party
      'corsheaders',
      'raven.contrib.django.raven_compat',
  )
  
  # TODO: Are there more granular ways to configure reporting specifically related to the API?
  RAVEN_CONFIG = {
      'dsn': osf_settings.SENTRY_DSN
  }
  
  # Settings related to CORS Headers addon: allow API to receive authenticated requests from OSF
  # CORS plugin only matches based on "netloc" part of URL, so as workaround we add that to the list
  CORS_ORIGIN_ALLOW_ALL = False
  CORS_ORIGIN_WHITELIST = (urlparse(osf_settings.DOMAIN).netloc,
                           osf_settings.DOMAIN,
                           )
  CORS_ALLOW_CREDENTIALS = True
  
  MIDDLEWARE_CLASSES = (
      # TokuMX transaction support
      # Needs to go before CommonMiddleware, so that transactions are always started,
      # even in the event of a redirect. CommonMiddleware may cause other middlewares'
      # process_request to be skipped, e.g. when a trailing slash is omitted
      'api.base.middleware.DjangoGlobalMiddleware',
      'api.base.middleware.TokuTransactionsMiddleware',
  
      # 'django.contrib.sessions.middleware.SessionMiddleware',
      'corsheaders.middleware.CorsMiddleware',
      'django.middleware.common.CommonMiddleware',
      'django.middleware.csrf.CsrfViewMiddleware',
      # 'django.contrib.auth.middleware.AuthenticationMiddleware',
      # 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
      # 'django.contrib.messages.middleware.MessageMiddleware',
      'django.middleware.clickjacking.XFrameOptionsMiddleware',
      'django.middleware.security.SecurityMiddleware',
  
  )
  
  TEMPLATES = [
      {
          'BACKEND': 'django.template.backends.django.DjangoTemplates',
          'DIRS': [os.path.join(BASE_DIR, 'templates')],
          'APP_DIRS': True
      }]
  
  
  ROOT_URLCONF = 'admin.base.urls'
  WSGI_APPLICATION = 'api.base.wsgi.application'
  
  
  LANGUAGE_CODE = 'en-us'
  
subject: Add admin for admin