text: """
  Django settings for beak_emailer_list project.
  
  Generated by 'django-admin startproject' using Django 3.1.1.
  
  For more information on this file, see
  https://docs.djangoproject.com/en/3.1/topics/settings/
  
  For the full list of settings and their values, see
  https://docs.djangoproject.com/en/3.1/ref/settings/
  """
  import os
  from pathlib import Path
  from dotenv import load_dotenv
  
  # Build paths inside the project like this: BASE_DIR / 'subdir'.
  BASE_DIR = Path(__file__).resolve().parent.parent
  
  # load environment variables
  load_dotenv(Path(BASE_DIR, '.env'))
  
  # Quick-start development settings - unsuitable for production
  # See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
  
  # Application definition
  
  INSTALLED_APPS = [
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
      'additonal_utils',
      'kita',
      'kita_representative',
      'kita_friends',
      'emailer',
      'tinymce',
      'scheduler',
  ]
  
  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 = 'beak_emailer_list.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 = 'beak_emailer_list.wsgi.application'
  
  
  # Password validation
  # https://docs.djangoproject.com/en/3.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/3.1/topics/i18n/
  
  LANGUAGE_CODE = 'de'
  
  TIME_ZONE = 'UTC'
  
  USE_I18N = True
  
  USE_L10N = True
  
  USE_TZ = True
  
  
  # Static files (CSS, JavaScript, Images)
  # https://docs.djangoproject.com/en/3.1/howto/static-files/
  
  STATIC_URL = '/static/'
  STATIC_ROOT = Path(Path(__file__).absolute().parent.parent, 'static')
  
  EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
  EMAIL_HOST = os.environ.get('EMAIL_HOST')
  EMAIL_HOST_USER = os.environ.get('EMAIL_USER')
  EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_PASSWD')
  EMAIL_PORT = 587
  EMAIL_USE_TLS = True
  
  
  TINYMCE_DEFAULT_CONFIG = {
      'cleanup_on_startup': True,
      'custom_undo_redo_levels': 20,
      'selector': 'textarea',
      'theme': 'silver',
      'plugins': '''
              link codesample table code lists insertdatetime  nonbreaking
              directionality searchreplace wordcount visualblocks
              visualchars code fullscreen autolink lists anchor pagebreak
              ''',
      'toolbar1': '''
              bold italic underline | fontselect, fontsizeselect  | forecolor backcolor | alignleft alignright |
              aligncenter alignjustify | indent outdent | bullist numlist table |
              | link | codesample |
              ''',
      'toolbar2': '''
              visualblocks visualchars | code |
              ''',
      'contextmenu': 'formats | link image',
      'menubar': False,
      'statusbar': True,
  }
  
  WP_NEWSLETTER_PLUGIN_KEY = os.getenv("WP_NEWSLETTER_PLUGIN_KEY")
  WP_NEWSLETTER_PLUGIN_SECRET = os.getenv("WP_NEWSLETTER_PLUGIN_SECRET")
  WP_NEWSLETTER_PLUGIN_API_KEY = os.getenv("WP_NEWSLETTER_PLUGIN_API_KEY")
  WP_NEWSLETTER_PLUGIN_URI = os.getenv("WP_NEWSLETTER_PLUGIN_URI")
  
  try:
      from beak_emailer_list.local_settings import *
  except ImportError:
      SECURE_SSL_REDIRECT = True
      SESSION_COOKIE_SECURE = True
      CSRF_COOKIE_SECURE = True
  
      # Database
      # https://docs.djangoproject.com/en/3.1/ref/settings/#databases
      DATABASES = {
          'default': {
              'ENGINE': 'django.db.backends.mysql',
              'OPTIONS': {
                  'init_command': "SET sql_mode='STRICT_TRANS_TABLES'",
              },
              'NAME': os.environ.get('DB_NAME'),
              'USER': os.environ.get('DB_USER'),
              'PASSWORD': os.environ.get('DB_PASSWORD'),
              'HOST': os.environ.get('DB_HOST'),
          }
      }
  
      # SECURITY WARNING: keep the secret key used in production secret!
      SECRET_KEY = os.environ.get('SECRET_KEY', 'foobar_3$14285')
  
      # SECURITY WARNING: don't run with debug turned on in production!
      DEBUG = False
  
      ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS', '127.0.0.1').split(',')
  
  