text: """
  Django settings for project project.
  
  Generated by 'django-admin startproject' using Django 2.1.
  
  For more information on this file, see
  https://docs.djangoproject.com/en/2.1/topics/settings/
  
  For the full list of settings and their values, see
  https://docs.djangoproject.com/en/2.1/ref/settings/
  """
  
  import os
  import sentry_sdk
  from sentry_sdk.integrations.django import DjangoIntegration
  
  # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  SETTINGS_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  BASE_DIR = os.path.dirname(SETTINGS_DIR)
  POSTGRESQL = True
  
  # Quick-start development settings - unsuitable for production
  # See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/
  
  # SECURITY WARNING: keep the secret key used in production secret!
  SECRET_KEY = 'template'
  
  # SECURITY WARNING: don't run with debug turned on in production!
  DEBUG = False
  ALLOWED_HOSTS = ['xxxx']
  
  # Application definition
  INSTALLED_APPS = [
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'whitenoise.runserver_nostatic',  # < Per Whitenoise, to disable built in
      'django.contrib.staticfiles',
      'django.contrib.postgres',
      'corsheaders',
      'rest_framework',
      'rest_framework.authtoken',
      'channels',
      'backend.api',
      'taggit',
      'taggit_serializer',
      'drf_yasg',
      'storages',
  ]
  
  MIDDLEWARE = [
      'django.middleware.security.SecurityMiddleware',
      'whitenoise.middleware.WhiteNoiseMiddleware',
      'django.contrib.sessions.middleware.SessionMiddleware',
      'django.middleware.csrf.CsrfViewMiddleware',
      'django.contrib.auth.middleware.AuthenticationMiddleware',
      'django.contrib.messages.middleware.MessageMiddleware',
      'django.middleware.clickjacking.XFrameOptionsMiddleware',
      'corsheaders.middleware.CorsMiddleware',
      'django.middleware.common.CommonMiddleware',
  ]
  
  ROOT_URLCONF = 'backend.urls'
  
  TEMPLATES = [
      {
          'BACKEND': 'django.template.backends.django.DjangoTemplates',
          # Add dist to
          'DIRS': ['dist'],
          '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 = 'backend.wsgi.application'
  
  
  # Database
  # https://docs.djangoproject.com/en/2.1/ref/settings/#databases
  DATABASES = {
      'default': {
          # engines: 'postgresql', 'mysql', 'sqlite3' or 'oracle'
          'ENGINE': 'django.db.backends.postgresql',
          'NAME': 'template_db',
          'USER': 'template_admin',
          'PASSWORD': '$templatepass$',
          'HOST': 'localhost',
          'PORT': '',
      }
  }
  
  
  # Password validation
  # https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators
  
  AUTH_PASSWORD_VALIDATORS = [
      {
          'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
      },
      {
          'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
          'OPTIONS': {
              'min_length': 9,
          }
      },
      {
          'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
      },
      {
          'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
      },
  ]
  
  AUTHENTICATION_BACKENDS = (
      'django.contrib.auth.backends.ModelBackend',
  )
  
  # Internationalization
  # https://docs.djangoproject.com/en/2.1/topics/i18n/
  
  LANGUAGE_CODE = 'es-CL'
  TIME_ZONE = 'UTC'
  USE_I18N = True
  USE_L10N = True
  USE_TZ = True
  
  
  # Static files (CSS, JavaScript, Images)
  # https://docs.djangoproject.com/en/2.1/howto/static-files/
  
  # When Vue Builds, path will be `/static/css/...` so we will have Django Serve
  # In Production, it's recommended use an alternative approach such as:
  # http://whitenoise.evans.io/en/stable/django.html?highlight=django
  
  MIDDLEWARE_CLASSES = (
      'whitenoise.middleware.WhiteNoiseMiddleware',
  )
  
  STATIC_URL = '/static/'
  # Place static in the same location as webpack build files
  STATIC_ROOT = os.path.join(BASE_DIR, 'dist', 'static')
  STATICFILES_DIRS = []
  
  # media
  MEDIA_ROOT = os.path.join(BASE_DIR, 'media_test/')
  MEDIA_URL = '/uploads/'
  
  
  ##########
  # STATIC #
  ##########
  
  STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
  
  # Insert Whitenoise Middleware at top but below Security Middleware
  # MIDDLEWARE.insert(1, 'whitenoise.middleware.WhiteNoiseMiddleware',)
  # http://whitenoise.evans.io/en/stable/django.html#make-sure-staticfiles-is-configured-correctly
  
  
  # The email backend to use. For possible shortcuts see django.core.mail.
  # The default is to use the SMTP backend.
  # Third-party backends can be specified by providing a Python path
  # to a module that defines an EmailBackend class.
  ENABLE_EMAILS = False
  if DEBUG or not ENABLE_EMAILS:
      EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
  else:
      EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
  
  
  # auth model
  AUTH_USER_MODEL = 'api.User'
  
  # Admins
  ADMINS = ()
  
  LOGIN_URL = 'login'
  LOGOUT_URL = 'logout'
  LOGIN_REDIRECT_URL = 'index'
  
  # ASGI
  ASGI_APPLICATION = "backend.api.routing.application"
  
  CHANNEL_LAYERS = {
      'default': {
          'BACKEND': 'channels_redis.core.RedisChannelLayer',
          'CONFIG': {
              "hosts": [('127.0.0.1', 6379)],
          },
      },
  }
  
  # BOTO3 AWS
  DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
  AWS_ACCESS_KEY_ID = 'xxxxxxxxxx'
  AWS_SECRET_ACCESS_KEY = 'xxxxxxx'
  AWS_STORAGE_BUCKET_NAME = 'template'
  
  # SENTRY
  sentry_sdk.init(
      dsn="https://xxxxxx@sentry.io/xxxxx",
      integrations=[DjangoIntegration()],
  
      # If you wish to associate users to errors (assuming you are using
      # django.contrib.auth) you may enable sending PII data.
      send_default_pii=True
  )