def generate_settings():
    """
    This command is run when ``default_path`` doesn't exist, or ``init`` is
    run and returns a string representing the default data to put into their
    settings file.
    """
    output = CONFIG_TEMPLATE.format(
        # we use Fernet.generate_key to make sure that the key length is
        # compatible with Fernet
        encryption_key=Fernet.generate_key().decode("utf-8"),
        secret_token=base64.b64encode(os.urandom(KEY_LENGTH)).decode("utf-8"),
        flask_secret_key=base64.b64encode(os.urandom(KEY_LENGTH)).decode("utf-8"),
        oauth_state_token_secret=base64.b64encode(os.urandom(KEY_LENGTH)),
    )

    return output

    This command is run when ``default_path`` doesn't exist, or ``init`` is
    run and returns a string representing the default data to put into their
    settings file.
    
lemur/manage.py