Aug-15-2019, 09:51 PM
Change config.py to:
What happens when use
This will not be the same for you.
If want look at your environment variables.
This is done for safety concern for not having these values directly in code,but getting them from OS.
I like better python-dotenv for having environment variable closer to project and not on OS.
You don't have to think of these safety yet,as running the local development server now.
1 2 3 4 5 6 7 8 9 10 |
import os class Config: SECRET_KEY = '12345' MAIL_SERVER = 'smtp.googlemail.com' MAIL_PORT = 587 MAIL_USE_TLS = True MAIL_USERNAME = 'Test' MAIL_PASSWORD = '99999' |
os.environ.get
is that Corey is taking environment variables from his own OS.This will not be the same for you.
If want look at your environment variables.
1 2 3 |
>>> import os >>> >>> os.environ |
I like better python-dotenv for having environment variable closer to project and not on OS.
You don't have to think of these safety yet,as running the local development server now.