Open Mykola-CI opened 4 months ago
load_dotenv()
show that .env
file is not correctly loaded.
Whatever DEBUG value the load_dotenv()
function loads True until VS Code is restarted.
After restart it picks up pre-set False. However, when again changed to True load_dotenv()
keeps loading False.The problem is related to the operational bug of VS Code integrated Terminal. Most likely it is a bug connected with caching environment variables by the development environment in my VS Code.
The issue to be moved to Done with reservation column of the Progress Board BUT not Closed until the project submission.
Date of discover: 20th April 2023
Context:
manage.py runserver
expected to servelocal.py
settings atDEBUG=True
and serve production.py settings atDEBUG=False
.DEBUG
is assigned in .env file and retrieved by.load_dotenv()
function and get byos.getenv()
method.Problem description: When
DEBUG
is reset toFalse
,manage.py
keeps servinglocal.py