当前位置: 首页>>代码示例>>Python>>正文


Python DataStore.get_attachments_by_request_id方法代码示例

本文整理汇总了Python中datastore.DataStore.get_attachments_by_request_id方法的典型用法代码示例。如果您正苦于以下问题:Python DataStore.get_attachments_by_request_id方法的具体用法?Python DataStore.get_attachments_by_request_id怎么用?Python DataStore.get_attachments_by_request_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在datastore.DataStore的用法示例。


在下文中一共展示了DataStore.get_attachments_by_request_id方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: str

# 需要导入模块: from datastore import DataStore [as 别名]
# 或者: from datastore.DataStore import get_attachments_by_request_id [as 别名]
					solr_sessions[agendaitem['session_id']] = str(agendaitem['session_id']) + ' ' + agendaitem['session_identifier'].decode('utf-8')
				if agendaitem['committee_id'] is not None:
					result = ''
					solr_committees[agendaitem['committee_id']] = str(agendaitem['committee_id']) + ' ' + agendaitem['committee_title'].decode('utf-8') + result
					if agendaitem['agendaitem_subject'] is not None:
						solr_agendaitem_subjects[int(agendaitem['agendaitem_id'])] = agendaitem['agendaitem_subject'].decode('utf-8')
						if agendaitem['agendaitem_result'] is not None:
							solr_agendaitem_subjects[int(agendaitem['agendaitem_id'])] += ' '+ agendaitem['agendaitem_result'].decode('utf-8')
						# match streeets
						matching_streets_subjects = match_streets(streets, agendaitem['agendaitem_subject'])
						if matching_streets_subjects is not None:
							for street in matching_streets_subjects:
								solr_streets[street.decode('utf-8')] = True
		
		# Verknüpfte Anhänge
		attachments = db.get_attachments_by_request_id(request['request_id'])
		for attachment in attachments:
			#print "###### Anhang:", attachment['attachment_role'], attachment['attachment_filename']
			if attachment['attachment_content'] is not None:
				dehyphenated = fix_hyphenation(strip_tags(attachment['attachment_content'].decode('utf-8')), hyphenation_map)
				solr_attachment_bodies[int(attachment['attachment_id'])] = dehyphenated
				solr_attachments[attachment['attachment_id']] = str(attachment['attachment_id']) + ' ' + attachment['attachment_role'].decode('utf-8')
				matching_streets_attachments = match_streets(streets, dehyphenated.encode('utf-8'))
				if matching_streets_attachments is not None:
					for street in matching_streets_attachments:
						solr_streets[street.decode('utf-8')] = True
		
		# Verknuepfte Personen
		people = db.get_attending_people_by_request_id(request['request_id'])
		if people is not None:
			for person in people:
开发者ID:stefanw,项目名称:cologne-ris-scraper,代码行数:33,代码来源:solr_import.py


注:本文中的datastore.DataStore.get_attachments_by_request_id方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。