Pycharm supports its own version of environment variables, and they are not obtained from the shell.
It seems that if pycharm is run from virtualenv or a shell containing the specified variables, it will load with them, however it is not dynamic.
the answer below has a settings.py script parameter so that virtualenv updates and saves the settings. Whether this is a complete solution to your question or not, I'm not sure.
Pycharm: set an environment variable to run manage.py
Ryan cook
source share