Trouble reading environment variables locally

Posted July 2, 2021 189 views
PythonDjangoPython FrameworksDevelopmentDigitalOcean App Platform

Very helpful tutorial. I’m new to this platform and Django and I would like to test my app locally before deploying. I changed the DEVELOPMENT_MODE environment variable to False, but it doesn’t look like Django is reading the environment variables. When I print os.getenv() for any variable, it returns None. Is this supposed to happen? Thanks in advance for the help!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

I have the same problem.