text: """
  Django settings for daphne_brain project.
  
  Generated by 'django-admin startproject' using Django 1.10.6.
  
  For more information on this file, see
  https://docs.djangoproject.com/en/1.10/topics/settings/
  
  For the full list of settings and their values, see
  https://docs.djangoproject.com/en/1.10/ref/settings/
  """
  
  import os
  
  # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  
  # Quick-start development settings - unsuitable for production
  # See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/
  
  # SECURITY WARNING: keep the secret key used in production secret!
  SECRET_KEY = 'aaaaa'
  
  # SECURITY WARNING: don't run with debug turned on in production!
  DEBUG = True
  
  ALLOWED_HOSTS = ['localhost', '127.0.0.1', 'www.selva-research.com', 'selva-research.engr.tamu.edu', 'dev.selva-research.com']
  
  USE_X_FORWARDED_HOST = True
  
  # ACTIVE_MODULES = ['EDL', 'EOSS', 'AT']
  ACTIVE_MODULES = ['EOSS']
  
  EDL_PATH = '/Users/ssantini/Desktop/'
  
  
  # Application definition
  
  INSTALLED_APPS = [
      'channels',
      'corsheaders',
      'daphne_context',
      'EOSS',
      'EDL',
      'AT',
      'auth_API',
      'experiment',
      'iFEED_API',
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
      'rest_framework'
  ]
  
  MIDDLEWARE = [
      'corsheaders.middleware.CorsMiddleware',
      'django.middleware.security.SecurityMiddleware',
      'daphne_brain.tamu_subdomains_session.TamuSubdomainsSessionMiddleware',
      'django.contrib.sessions.middleware.SessionMiddleware',
      'django.middleware.common.CommonMiddleware',
      'django.middleware.csrf.CsrfViewMiddleware',
      'django.contrib.auth.middleware.AuthenticationMiddleware',
      'django.contrib.messages.middleware.MessageMiddleware',
      'django.middleware.clickjacking.XFrameOptionsMiddleware',
  ]
  
  ROOT_URLCONF = 'daphne_brain.urls'
  
  TEMPLATES = [
      {
          'BACKEND': 'django.template.backends.django.DjangoTemplates',
          'DIRS': [os.path.join(BASE_DIR, 'templates')]
          ,
          'APP_DIRS': True,
          'OPTIONS': {
              'context_processors': [
                  'django.template.context_processors.debug',
                  'django.template.context_processors.request',
                  'django.contrib.auth.context_processors.auth',
                  'django.contrib.messages.context_processors.messages',
              ],
          },
      },
  ]
  
  WSGI_APPLICATION = 'daphne_brain.wsgi.application'
  
  
  # Database
  # https://docs.djangoproject.com/en/1.10/ref/settings/#databases
  
  DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.postgresql',
          'NAME': 'daphne',
          'USER': os.environ['USER'],
          'PASSWORD': os.environ['PASSWORD'],
          'HOST': os.environ['POSTGRES_HOST'],
          'PORT': os.environ['POSTGRES_PORT'],
      }
  }
  
  
  # Password validation
  # https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
  
  AUTH_PASSWORD_VALIDATORS = [
      {
          'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
      },
      {
          'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
      },
      {
          'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
      },
      {
          'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
      },
  ]
  
  # CORS & CSRF
  
  CORS_ORIGIN_WHITELIST = (
      'http://daphne.engr.tamu.edu',
      'http://localhost:8080',
      'http://dev.selva-research.com'
  )
  
  CORS_ALLOW_CREDENTIALS = True
  
  
  CSRF_TRUSTED_ORIGINS = (
      'http://daphne.engr.tamu.edu',
      'http://localhost:8080',
      'http://dev.selva-research.com'
  )
  
  
  # Internationalization
  # https://docs.djangoproject.com/en/1.10/topics/i18n/
  
  LANGUAGE_CODE = 'en-us'
  
  TIME_ZONE = 'America/Chicago'
  
  USE_I18N = True
  
  USE_L10N = True
  
  USE_TZ = True
  
  
  # Static files (CSS, JavaScript, Images)
  # https://docs.djangoproject.com/en/1.10/howto/static-files/
  
  STATIC_URL = '/static/'
  STATIC_ROOT = os.path.join(BASE_DIR, 'static')
  
  CHANNEL_LAYERS = {
      "default": {
          "BACKEND": "channels_redis.core.RedisChannelLayer",
          "CONFIG": {
              "hosts": [(os.environ['REDIS_HOST'], os.environ['REDIS_PORT'])],
          }
      },
  }
  
  # ASGI_APPLICATION should be set to your outermost router
  ASGI_APPLICATION = 'daphne_brain.asgi.application'
  
  # Databases for Daphne
  ALCHEMY_DATABASE = {
      'drivername': 'postgres',
      'host': os.environ['POSTGRES_HOST'],
      'port': os.environ['POSTGRES_PORT'],
      'username': os.environ['USER'],
      'password': os.environ['PASSWORD'],
      'database': 'daphne'
  }
  
  EDL_DATABASE = {
      'drivername': 'postgres',
      'host': os.environ['POSTGRES_HOST'],
      'port': os.environ['POSTGRES_PORT'],
      'username': os.environ['USER'],
      'password': os.environ['PASSWORD'],
      'database': 'edldatabase'
  }
  
  
  # Session configuration
  # SESSION_ENGINE = "merge_session.merge_db"
  
  # Email
  
  EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
  
  DEFAULT_FROM_EMAIL = 'Daphne Admin <daphne@selva-research.com>'
  
  
  # Logging
  
  LOGGING = {
      'version': 1,
      'disable_existing_loggers': False,
      'formatters': {
          'verbose': {
              'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
          },
          'simple': {
              'format': '[%(asctime)s] - %(name)s - %(levelname)s - %(message)s'
          },
          'standard': {
              'format': "[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s] %(message)s",
              'datefmt': "%Y/%m/%d %H:%M:%S"
          },
      },
      'handlers': {
          'file': {
              'level': 'DEBUG',
              'class': 'logging.FileHandler',
              'filename': BASE_DIR + '/logs/daphne.log',
              'formatter': 'standard',
          },
          'console': {
              'level': 'DEBUG',
              'class': 'logging.StreamHandler',
              'formatter': 'standard',
          },
          'null': {
              'class': 'logging.NullHandler',
          },
      },
      'loggers': {
          'django': {
              'handlers': ['file', 'console'],
              'level': 'ERROR',
              'propagate': True,
          },
          'iFEED': {
              'handlers': ['file', 'console'],
              'level': 'ERROR',
              'propagate': True,
          },
          'VASSAR': {
              'handlers': ['file', 'console'],
              'level': 'ERROR',
              'propagate': True,
          },
          'critic': {
              'handlers': ['file', 'console'],
              'level': 'ERROR',
              'propagate': True,
          },        
          'data-mining': {
              'handlers': ['file', 'console'],
              'level': 'ERROR',
              'propagate': True,
          },
          'debugging': {
              'handlers': ['file', 'console'],
              'level': 'DEBUG',
              'propagate': True,
          },
          'config': {
              'handlers': ['file', 'console'],
              'level': 'ERROR',
              'propagate': True,
          },
      },
  }
  