From ca5726c0a363cbc5e05c254b026edfc3f896ef2e Mon Sep 17 00:00:00 2001 From: Gary H <26419401+Gary-H9@users.noreply.github.com> Date: Thu, 4 Jul 2024 08:18:50 +0000 Subject: [PATCH] Linting --- .env.example | 8 +++++++- ollamate/settings.py | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index 3bb634c..060353c 100644 --- a/.env.example +++ b/.env.example @@ -1,7 +1,13 @@ +DB_NAME=ollamate +DB_USER=ollamate +DB_PASSWORD=ollamate + +SECRET_KEY= + CLIENT_ID= CLIENT_SECRET= AZURE_TENANT_ID= REDIRECT_URI= # when running locally, you can use -REDIRECT_URI="https://127.0.0.1:8000/azure_auth/callback" \ No newline at end of file +REDIRECT_URI="https://127.0.0.1:8000/azure_auth/callback" diff --git a/ollamate/settings.py b/ollamate/settings.py index aa669f0..c12f2f4 100644 --- a/ollamate/settings.py +++ b/ollamate/settings.py @@ -28,6 +28,7 @@ print(f"Loading environment variables from {env_file}") environ.Env.read_env(env_file) else: + print("Fix environment variables.") # print(f"{env_file} not found") # print("CLIENT_ID:", env("CLIENT_ID")) # print("CLIENT_SECRET:", env("CLIENT_SECRET")) @@ -41,7 +42,7 @@ # See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = "django-insecure-(y%c-1p0lnlrxg!$3w)ptcyp=wzer(biav_-%_fehgn1oatx8p" +SECRET_KEY = env("SECRET_KEY") # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True