Recently finished my app and I am ready to deploy it but I don't understand how to set the application's SECRET_KEY. I'm trying to change my database from sqlite to postgresql, but I get the following error:
raise KeyError(key) from None KeyError: 'SECRET_KEY'
development.py
from nurs_course.settings.common import *
ALLOWED_HOSTS = ['0.0.0.0', 'localhost']
SECRET_KEY = '9t*re^fdqd%-o_&zsu25(!@kcbk*k=6vebh(d*9r)+j8w%7ci1'
DEBUG = True
production.py
from nurs_course.settings.common import *
DEBUG = False
SECRET_KEY = os.environ['SECRET_KEY']
# SECURITY WARNING: update this when you have the production host
ALLOWED_HOSTS = ['0.0.0.0', 'localhost']
common.py
has all the other settings required. I use Windows OS w/ Powershell. I've been stuck on this for a bit and I am just unsure how to set the SECRET_KEY properly. Any help would be appreciated!