def parse_group(self, g_object):
styNormal = styleSheet['Normal']
styBackground = ParagraphStyle('background', parent=styNormal, backColor=colors.white)
gnr_question = g_object['name']
for first_children in g_object['children']:
question = first_children['name']
if gnr_question+"/"+question in self.main_answer:
if first_children['type'] == 'note':
answer= ''
elif first_children['type'] == 'photo':
photo = 'http://'+self.base_url+'/media/'+ self.media_folder +'/attachments/'+self.main_answer[gnr_question+"/"+question]
answer = self.create_logo(photo)
else:
answer = self.main_answer[gnr_question+"/"+question]
else:
answer = ''
if 'label' in first_children:
question = first_children['label']
row=[Paragraph(question, styBackground), answer]
self.data.append(row)
评论列表
文章目录