text: """
  Django settings for oddnary project.
  
  Generated by 'django-admin startproject' using Django 1.11.
  
  For more information on this file, see
  https://docs.djangoproject.com/en/1.11/topics/settings/
  
  For the full list of settings and their values, see
  https://docs.djangoproject.com/en/1.11/ref/settings/
  """
  
  import os
  import datetime
  from dotenv import load_dotenv
  
  AUTH_USER_MODEL = 'account.User'
  
  # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
  BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  
  env_path = os.path.join(BASE_DIR, ".env")
  
  load_dotenv(dotenv_path=env_path, verbose=True)
  
  load_dotenv()
  
  # Quick-start development settings - unsuitable for production
  # See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/
  
  # SECURITY WARNING: keep the secret key used in production secret!
  
  SECRET_KEY = os.getenv("SECRET_KEY")
  
  # SECURITY WARNING: don't run with debug turned on in production!
  DEBUG = True
  
  ALLOWED_HOSTS = ['*']
  
  
  # Application definition
  
  DEFAULT_APPS = [
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
  ]
  
  IN_HOUSE_APPS = [
      'account',
      'courses',
      'assignments',
  ]
  
  THIRD_PARTY_APPS = [
      'rest_framework',
      'storages',
      'corsheaders',
  ]
  
  INSTALLED_APPS = DEFAULT_APPS + IN_HOUSE_APPS + THIRD_PARTY_APPS
  
  MIDDLEWARE = [
      'django.middleware.security.SecurityMiddleware',
      'django.contrib.sessions.middleware.SessionMiddleware',
      'corsheaders.middleware.CorsMiddleware',
      'django.middleware.common.CommonMiddleware',
      'django.middleware.csrf.CsrfViewMiddleware',
      'django.contrib.auth.middleware.AuthenticationMiddleware',
      'django.contrib.messages.middleware.MessageMiddleware',
      'django.middleware.clickjacking.XFrameOptionsMiddleware',
  ]
  
  ROOT_URLCONF = 'oddnary.urls'
  
  TEMPLATES = [
      {
          'BACKEND': 'django.template.backends.django.DjangoTemplates',
          'DIRS': [],
          '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 = 'oddnary.wsgi.application'
  
  
  # Database
  # https://docs.djangoproject.com/en/1.11/ref/settings/#databases
  
  # DATABASES = {
  #     'default': {
  #         'ENGINE': 'django.db.backends.sqlite3',
  #         'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
  #     }
  # }
  
  DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.mysql',
          'NAME': os.getenv("SQL_DB_NAME"),
          'USER': os.getenv("SQL_USER"),
          'PASSWORD': os.getenv("SQL_PASSWORD"),
          'HOST': os.getenv("SQL_HOST"),
          'PORT': os.getenv("SQL_PORT"),
      }
  }
  
  
  # Password validation
  # https://docs.djangoproject.com/en/1.11/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/1.11/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/1.11/howto/static-files/
  
  STATICFILES_DIRS = [
      os.path.join(BASE_DIR, "static_assets"),
  ]
  
  # CORS
  
  CORS_ORIGIN_ALLOW_ALL = True
  
  CORS_ALLOW_METHODS = (
      'DELETE',
      'GET',
      'OPTIONS',
      'PATCH',
      'POST',
      'PUT',
  )
  
  REST_FRAMEWORK = {
      'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
      'PAGE_SIZE': 10,
      'DEFAULT_AUTHENTICATION_CLASSES': [
          'rest_framework_simplejwt.authentication.JWTAuthentication',
      ],
  }
  
  
  JWT_AUTH = {
      # how long the original token is valid for
      'JWT_EXPIRATION_DELTA': datetime.timedelta(days=2),
  
      # allow refreshing of tokens
      'JWT_ALLOW_REFRESH': True,
  
      # this is the maximum time AFTER the token was issued that
      # it can be refreshed.  exprired tokens can't be refreshed.
      'JWT_REFRESH_EXPIRATION_DELTA': datetime.timedelta(days=7),
  }
  
  