You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hmm, interesting point! We'd need to warn people not to do that if they have multiple websites, though, as that could lead to confusion -- I was helping someone out on tech support the other day who was getting really weird behaviour in bash with a Django site, and it turned out that they were setting stuff in their .bashrc that was related to one of their websites, which then broke stuff when they were working on another one.
@gpjt makes sense, however since the free version has just one website and that's probably what the most people are at, this becomes something worth mentioning. Not sure if there's a major use case making a virtualenv for one website.
https://github.com/pythonanywhere/help_pages/blob/master/articles/EnvironmentVariables.md
mentions how to load environment variables in your web application or in your virtualenv consoles.
However, not everyone uses a virtualenv and there is no documentation to address loading the environment variables into a normal bash console.
I discovered you just need to add
set -a; source ~/my-project-dir/.env; set +a
to the.bashrc
file that's at /home/username/ so it shouldn't be hard.I think this would make the article more complete, I could open a PR if you want but I wanted to run this past you guys first :)
The text was updated successfully, but these errors were encountered: