""" Django settings for envipath project. Generated by 'django-admin startproject' using Django 4.2.17. For more information on this file, see https://docs.djangoproject.com/en/4.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/4.2/ref/settings/ """ import os from pathlib import Path from dotenv import load_dotenv from envipy_plugins import Classifier, Property, Descriptor from sklearn.ensemble import RandomForestClassifier from sklearn.tree import DecisionTreeClassifier # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent load_dotenv(BASE_DIR / '.env', override=False) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '7!VTW`aZqg/UBLsM.P=m)2]lWqg>{+:xUgG1"WO@bCyaHR2Up8XW&g<*3.F4l2gi9c.E3}dHyA0D`&z?u#U%^7HYbj],eP"g_MS|3BNMD[mI>s# /password_reset/done is covered as well LOGIN_EXEMPT_URLS = [ '/register', '/api/legacy/', '/o/token/', '/o/userinfo/', '/password_reset/', '/reset/', '/microsoft/', ] # MS AD/Entra MS_ENTRA_ENABLED = os.environ.get('MS_ENTRA_ENABLED', 'False') == 'True' if MS_ENTRA_ENABLED: MS_ENTRA_CLIENT_ID = os.environ['MS_CLIENT_ID'] MS_ENTRA_CLIENT_SECRET = os.environ['MS_CLIENT_SECRET'] MS_ENTRA_TENANT_ID = os.environ['MS_TENANT_ID'] MS_ENTRA_AUTHORITY = f"https://login.microsoftonline.com/{MS_ENTRA_TENANT_ID}" MS_ENTRA_REDIRECT_URI = os.environ['MS_REDIRECT_URI'] MS_ENTRA_SCOPES = os.environ.get('MS_SCOPES', '').split(',')