I tried to put my Django Secret Key in Environment Variables.
SECRET_KEY = os.environ.get('SECRET_KEY')
I did save the SECRET_KEY on env var windows 10 like this
When I tried to py manage.py runserver, I got this error
django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
I followed this
But no idea with the solution..
At this point, strange thing even occurred, I tried to py manage.py without any SECRET_KEY on my Env Var on windows 10, and just leaving
SECRET_KEY = os.environ.get('SECRET_KEY')
in my settings.py.
I got no error.
Strange.. But when I deployed it on heroku, it says the same error like this
django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
Is anyone here experienced the same stuck like me? Please kindly advise. Thanks