import secrets


def gen_django_secret_key() -> str:
    """
    Return a 50 character random string usable as a SECRET_KEY setting value.
    Derived from Django's get_random_secret_key() and get_random_string(length, allowed_chars=RANDOM_STRING_CHARS)
    """
    return ''.join(secrets.choice('abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)') for i in range(50))