Hi,
In django, using a .env file, with an entry like this:
db_pass = 'my db pass word'
I have gotten the environment variable to work for Secret Key.
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'DIRT_SECRET_KEY'
with a matching entry in the .env file that looks like this:
DIRT_SECRET_KEY = 'some really long alpha numeric special character combination'
But for some reason it is not working for the database password.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'mwshovel$dirt',
'USER': 'mwshovel',
'PASSWORD': WHAT GOES HERE?, <--- is it in quotes, brackets,
'HOST': 'mwshovel.mysql.pythonanywhere-services.com',
}
}