# Change your settings file to this: SECRET_KEY = os.environ.get('SECRET_KEY', 'MY_DEFAULT_KEY') # Export the SECRET_KEY variable like in the terminal like so: $ export SECRET_KEY=my_secret_key_here