示例#1
0
def updateTimelineData(_article):
	timelineData = operatorDB.getTimelineData()
	startDate = time.strftime('%Y,%m,%d',time.localtime(_article._add_time))
	headline = _article._title
	text = '%s --- %sdetailpost/%s' % (_article._category,setting.BASE_URL,_article._id)
	_data = '%s,{"startDate":"%s","headline":"%s","text":"%s","asset":{"media":"","credit":"","caption":""}}' % (timelineData.timeline_data,startDate,headline,text)
	operatorDB.saveTimelineData(_data,timelineData.id)
示例#2
0
def updateTimelineData(_article):
	timelineData = operatorDB.getTimelineData()
	startDate = time.strftime('%Y,%m,%d',time.localtime(_article._add_time))
	headline = _article._title
	text = '%s --- %sdetailpost/%s' % (_article._category,setting.BASE_URL,_article._id)
	_data = '%s,{"startDate":"%s","headline":"%s","text":"%s","asset":{"media":"","credit":"","caption":""}}' % (timelineData.timeline_data,startDate,headline,text)
	operatorDB.saveTimelineData(_data,timelineData.id)
示例#3
0
def addTimelineData():
	_list = operatorDB.getArticleAllForTimeline()
	_data = ''
	for _article in _list:
		startDate = time.strftime('%Y,%m,%d',time.localtime(_article._add_time))
		headline = _article._title
		text = '%s --- %sdetailpost/%s' % (_article._category,setting.BASE_URL,_article._id)
		_data = '%s,{"startDate":"%s","headline":"%s","text":"%s","asset":{"media":"","credit":"","caption":""}}' % (_data,startDate,headline,text)
	operatorDB.saveTimelineData(_data[1:])
示例#4
0
def addTimelineData():
	_list = operatorDB.getArticleAllForTimeline()
	_data = ''
	for _article in _list:
		startDate = time.strftime('%Y,%m,%d',time.localtime(_article._add_time))
		headline = _article._title
		text = '%s --- %sdetailpost/%s' % (_article._category,setting.BASE_URL,_article._id)
		_data = '%s,{"startDate":"%s","headline":"%s","text":"%s","asset":{"media":"","credit":"","caption":""}}' % (_data,startDate,headline,text)
	operatorDB.saveTimelineData(_data[1:])