From 40a18d0ce4b51476b24fad5b690f7c13282f4fb9 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 24 Apr 2019 23:19:36 +1000 Subject: [PATCH] Ensure settings.py knows how to access secret_key.txt --- InvenTree/InvenTree/settings.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py index 038e7429b5..65581eb4e6 100644 --- a/InvenTree/InvenTree/settings.py +++ b/InvenTree/InvenTree/settings.py @@ -21,8 +21,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! - -key_file = open('secret_key.txt', 'r') +key_file = open(os.path.join(BASE_DIR, 'secret_key.txt'), 'r') SECRET_KEY = key_file.read().strip()