[Django]-SECRET_KEY errors with environment variables

3👍

You don’t have an environment variable named SECRET_KEY. You need to set it before you run your program.

On Unix

export SECRET_KEY="password"

On Windows

set SECRET_KEY="password"

It’s worth noting that the variable will disappear when you close the terminal. There are ways around that if you’d like to look for them.

Leave a comment