@classmethod
def get_settings(cls, from_group=None):
    """This will return all settings with the key as the key for the dict
        and the values are packed again in a dict which contains
        the remaining attributes.

        :param from_group: Optionally - Returns only the settings from a group.
        """
    result = None
    if from_group is not None:
        result = from_group.settings
    else:
        result = cls.query.all()
    settings = {}
    for setting in result:
        settings[setting.key] = setting.value
    return settings
