Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment Variables help page does not address non virtualenv bash consoles #44

Open
aadibajpai opened this issue Jun 15, 2019 · 2 comments

Comments

@aadibajpai
Copy link

aadibajpai commented Jun 15, 2019

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 :)

@gpjt
Copy link
Collaborator

gpjt commented Jun 17, 2019

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.

@aadibajpai
Copy link
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants