Is it acceptable to generate my SECRET_KEY in Django
base64.base64encode(os.urandom(32))
or would using
binascii.hexlify(os.urandom(32))
be a better option?
If neither of these, what would you suggest? I'm trying to avoid Django's get_random_string
since I don't think that is as secure. This is for a production environment. I could also increase the integer passed to os.urandom
but I'm not sure what value is not overkill.