I am working on a Django application. I want to put the SECRET_KEY in environment variables. I added this to the .bashrc file:
export SECRET_KEY=sdfsjhsuresfsdf
The i did source .bashrc
I am able to access the environment variable from python shell using:
import os
os.environ['SECRET_KEY']
But, it shows a keyError
when I try to access this from settings.py
file. What am I doing wrong?