mirror of https://gitlab.crans.org/bde/nk20
Environment file path is absolute
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
parent
e95a8b6e18
commit
b5ef937a03
|
@ -12,7 +12,7 @@ def read_env():
|
|||
directory.
|
||||
"""
|
||||
try:
|
||||
with open('.env') as f:
|
||||
with open(os.path.join(BASE_DIR, '.env')) as f:
|
||||
content = f.read()
|
||||
except IOError:
|
||||
content = ''
|
||||
|
@ -30,6 +30,7 @@ def read_env():
|
|||
|
||||
|
||||
# Try to load environment variables from project .env
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
read_env()
|
||||
|
||||
# Load base settings
|
||||
|
|
Loading…
Reference in New Issue