From c5db556822b57e320ba241a6818230253ef7dc9f Mon Sep 17 00:00:00 2001 From: TidyData Date: Sat, 17 Dec 2016 15:27:43 -0800 Subject: [PATCH] accidentally deleted my .env file and wasted 1.5 hours, hopefully this saves others from the same mistake. My .env file was embedded in my repo and I cleaned out my repo thinking every file in it was version control, only to find a key file missing. Then recreating I left the pything string "'" at the end and didn't catch it until now. Signed-off-by: TidyData --- {{cookiecutter.project_slug}}/config/settings/common.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/{{cookiecutter.project_slug}}/config/settings/common.py b/{{cookiecutter.project_slug}}/config/settings/common.py index c9433416c..6c8c9adea 100644 --- a/{{cookiecutter.project_slug}}/config/settings/common.py +++ b/{{cookiecutter.project_slug}}/config/settings/common.py @@ -16,6 +16,8 @@ ROOT_DIR = environ.Path(__file__) - 3 # ({{ cookiecutter.project_slug }}/config APPS_DIR = ROOT_DIR.path('{{ cookiecutter.project_slug }}') env = environ.Env() +# Assumes .env exists one folder above where manage.py exists +env.read_env(str((ROOT_DIR - 1).path('.env'))) # reads the environment file # APP CONFIGURATION # ------------------------------------------------------------------------------