text: """
  Django settings for bigday project.
  
  Generated by 'django-admin startproject' using Django 2.1.
  Modified from guidance in this tutorial for deploying to Google Cloud Platform:
  https://codeburst.io/beginners-guide-to-deploying-a-django-postgresql-project-on-google-cloud-s-flexible-app-engine-e3357b601b91
  
  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
  
  # 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/2.1/howto/deployment/checklist/
  
  
  # SECURITY WARNING: don't run with debug turned on in production!
  DEBUG = not (os.getenv('DEBUG', True) == True) # environment vars are strings. "convert" to boolean.
  SECRET_KEY = os.getenv('SECRET_KEY', "default_secret_key")
  
  
  ALLOWED_HOSTS = [
       '.johnpluskari.com', # for deployment
       '.kariplusjohn.com',
       '35.185.202.211',
       '127.0.0.1', # for local testing
  ]
  
  
  # Application definition
  
  INSTALLED_APPS = [
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
      'guests',
      'health_check',
      'health_check.db',
      'health_check.cache',
      'health_check.storage',
  ]
  
  MIDDLEWARE = [
      'django.middleware.security.SecurityMiddleware',
      '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 = 'bigday.urls'
  WSGI_APPLICATION = 'bigday.wsgi.application'
  
  
  TEMPLATES = [
      {
          'BACKEND': 'django.template.backends.django.DjangoTemplates',
          'DIRS': [
              os.path.join('bigday', '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',
              ],
          },
      },
  ]
  
  
  
  
  # Database
  # https://docs.djangoproject.com/en/2.1/ref/settings/#databases
  
  DATABASES = {
      'default': {
         'ENGINE': 'django.db.backends.postgresql',
         'HOST': os.environ['DB_HOST'],
         'PORT': os.environ['DB_PORT'],
         'NAME': os.environ['DB_NAME'],
         'USER': os.environ['DB_USER'],
         'PASSWORD': os.environ['DB_PASSWORD']
     }
  }
  
  # SMTP Email
  # https://docs.djangoproject.com/en/2.1/ref/settings/#email
  
  EMAIL_HOST = 'smtp.gmail.com'
  EMAIL_HOST_PASSWORD = os.environ['EMAIL_HOST_PASSWORD']
  EMAIL_HOST_USER = os.environ['EMAIL_HOST_USERNAME']
  EMAIL_PORT = 587
  EMAIL_USE_TLS = True
  
  # 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',
      },
      {
          'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
      },
      {
          'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
      },
  ]
  
  
  # Internationalization
  # https://docs.djangoproject.com/en/2.1/topics/i18n/
  
  LANGUAGE_CODE = 'en-us'
  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/
  STATIC_URL = os.getenv('STATIC_URL', '/static/') # /static/ if DEBUG else Google Cloud bucket url
  
  # collectstatic directory (located OUTSIDE the base directory)
  STATIC_ROOT = os.path.join(os.path.dirname(BASE_DIR), 'static.johnpluskari.com')
  
  STATICFILES_DIRS = (
      os.path.join('bigday', 'static'),
  )
  
  # the address your emails (save the dates/invites/etc.) will come from
  
  DEFAULT_WEDDING_FROM_EMAIL = 'Kari + John <jlb.kmd.wedding@gmail.com>'
  # the default reply-to of your emails
  DEFAULT_WEDDING_REPLY_EMAIL = 'jlb.kmd.wedding@gmail.com'
  
  # when sending test emails it will use this address
  DEFAULT_WEDDING_TEST_EMAIL = DEFAULT_WEDDING_FROM_EMAIL
  WEDDING_CC_LIST = []  # put email addresses here if you want to cc someone on all your invitations
  
  #try:
  #    from .localsettings import *
  #except ImportError:
  #    pass
  