From: Patrick Canterino Date: Sun, 23 Jan 2022 17:26:22 +0000 (+0100) Subject: Changed the way the .env file is loaded X-Git-Url: https://git.p6c8.net/pcdenotes.git/commitdiff_plain/80a429d30dd44b0274bf92486fa7639441116ced Changed the way the .env file is loaded --- diff --git a/pcdenotes/settings.py b/pcdenotes/settings.py index db9476f..5e82661 100644 --- a/pcdenotes/settings.py +++ b/pcdenotes/settings.py @@ -13,13 +13,14 @@ https://docs.djangoproject.com/en/3.2/ref/settings/ from pathlib import Path from dotenv import load_dotenv, find_dotenv -load_dotenv(find_dotenv()) import os # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent +# Load .env file +load_dotenv(BASE_DIR / '.env') # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/