📜  为 django 生成 50 个字符长 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:36.460000             🧑  作者: Mango

代码示例1
def get_random_secret_key():
    """
    Return a 50 character random string usable as a SECRET_KEY setting value.
    """
    chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)'
    return get_random_string(50, chars)