(domain)
return descriptions_dict
This returns a dictionary of the structure
    {
        case_type: {
                        case_property: description,
                        ...
                    },
        ...
    }
    for each case type and case property in the domain.
This returns a dictionary of the structure
    {
        case_type: {
                        case_property: description,
                        ...
                    },
        ...
    }
    for each case type and case property in the domain.
This returns a dictionary of the structure { case_type : { case_property : description ... } ... } for each case type and case property in the domain .
def get_case_property_description_dict(domain):
    """
    This returns a dictionary of the structure
    {
        case_type: {
                        case_property: description,
                        ...
                    },
        ...
    }
    for each case type and case property in the domain.
    """
    annotated_types = CaseType.objects.filter(domain=domain).prefetch_related('properties')
    descriptions_dict = {}
    for case_type in annotated_types:
        descriptions_dict[case_type.name] = {prop.name: prop.description for prop in case_type.properties.all()}
    return descriptions_dict
def get_case_property_description_dict ( domain ) : annotated_types = CaseType . objects . filter ( domain = domain ) . prefetch_related ( 'properties' ) descriptions_dict = { } for case_type in annotated_types : descriptions_dict [ case_type . name ] = { prop . name : prop . description for prop in case_type . properties . all ( ) } return descriptions_dict