I have an environment variable exported in bash. Project is in localhost. OS is Debian 9 Stretch
.
When I run, in command line:
python -c "import os; print(os.environ.get('EMAIL_PASSWORD'))"
I get the variable value.
But, inside Django, calling os.environ.get('EMAIL_PASSWORD')
returns None
.
In settings:
EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_PASSWORD')
Already find n similar questions, but in general the problem is that the variable wasn't exported to environment
.
What I am missing?
Update: Django virtual server is called directly from Pycharm