'Returns a dict of template info'

def templates_dict(self, use_name=False):

    template_data = {}
    for temp_info in self.info_association:
        template = temp_info.template
        content = temp_info.info.content
        tmp_dict = {}
        for field in template.fields:
            if use_name:
                name = field['name']
            else:
                name = field['label']
            tmp_dict[name] = content.get(field['name'])
        template_data[template.name] = tmp_dict
    return template_data
