Nice article but I lost you when you got to the section "Changing the secret key". Your tutorial was step by step and then I did not know where to changes these keys.
You can leave the default key to "change-in-production" as it will only be used in development.
After you have set your app to take it's SECRET_KEY from an environmental variable you need to set that environmental variable for your app on heroku. For this you need to download the Heroku CLI. After which you can set your apps environmental variables with the command:
heroku config:set SECRET_KEY=very-long-secret-key
You should replace "very-long-secret-key" with a very long password.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice article but I lost you when you got to the section "Changing the secret key". Your tutorial was step by step and then I did not know where to changes these keys.
So by default your settings file will have a line that looks like this:
You need to change this key in production (for security), which is why you should change it to an environmental variable.
You can leave the default key to "change-in-production" as it will only be used in development.
After you have set your app to take it's SECRET_KEY from an environmental variable you need to set that environmental variable for your app on heroku. For this you need to download the Heroku CLI. After which you can set your apps environmental variables with the command:
You should replace "very-long-secret-key" with a very long password.