Re: get_random_secret_key not documented!?

2022-06-01 Thread epokeins
Thank you. I thought every function should be documented and nobody realized that this one is not. But if that's not the case maybe one should at least point out to the Python best practice which your just mentioned Adam. I didn't know that recipe one so far. But shouldn't almost everyone

Re: get_random_secret_key not documented!?

2022-06-01 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Python's secrets module has token_hex and a short recipe for generating random strings: https://docs.python.org/3.10/library/secrets.html#recipes-and-best-practices . I don't think Django needs to provide a public function here. I would advise Digital Ocean to recommend the secrets module. On

Re: get_random_secret_key not documented!?

2022-06-01 Thread Fab
There isn't a recommended way so you can generate it however you want. The function is used in the startproject command for convenience. On Monday, 16 May 2022

get_random_secret_key not documented!?

2022-05-16 Thread Sam
In the DigitalOcean documentation I just found that they use `from django.core.management.utils import get_random_secret_key` to generate a new, unique secret key. I didn't know that there was such a