]> git.p6c8.net - pcdenotes.git/commitdiff
Changed the way the .env file is loaded
authorPatrick Canterino <patrick@patrick-canterino.de>
Sun, 23 Jan 2022 17:26:22 +0000 (18:26 +0100)
committerPatrick Canterino <patrick@patrick-canterino.de>
Sun, 23 Jan 2022 17:26:22 +0000 (18:26 +0100)
pcdenotes/settings.py

index db9476f1c3d4ee2ed7d4a420bc4b5db257f97e2a..5e82661fadc6233b1705e8bdacf0ad4c2f47ba08 100644 (file)
@@ -13,13 +13,14 @@ https://docs.djangoproject.com/en/3.2/ref/settings/
 from pathlib import Path
 
 from dotenv import load_dotenv, find_dotenv
 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
 
 
 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/
 
 # Quick-start development settings - unsuitable for production
 # See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/

patrick-canterino.de