Closed tim-schilling closed 6 years ago
@tim-schilling There's a default way to do this or just change the key in everything i want ?
To get a new key:
python manage.py shell -c 'from django.core.management import utils; print(utils.get_random_secret_key())'
i got a key and passed it to pythonanywhere although i changed it to string 'secret' here in github . #74 ( commit : secret key fixed ) @tim-schilling Is this what you suggested for ?
You have to save a environment variable like this in your linux server:
export SECRET_KEY="S3CR3T"
And in your settings file load that environment variable like this:
import os
SECRET_KEY = os.environ.get('SECRET_KEY')
There is a way in PythonAnywhere to set an environment variable.
I think it works the way i did it @robertpro
It works, but it is not correct :( @angeanto
You absolutely need to change your secret key (some reasons why) and then switch it with something similar to:
Do the same for your google API key.