示例#1
0
	def print_reply(self):
		if self.in_reply_to == "":
			return ""
		else:
			import Search
			reply_to = Search.search_bleat_by_bleat_ID(self.in_reply_to)
			if reply_to.exist:
				return open(base+"reply_dropdown.html").read().format(reply_to.content + "<p/><strong> By:</strong>"+ reply_to.author)
			else:
				return ""
			return open(base+"reply_dropdown.html").read().format(self.in_reply_to)
示例#2
0
	def print_bleats(self):
		import Search
		string=""
		def getKey(custom):
			return custom.time
		bleat_list=list()
		for bleat in self.bleats:
			try:
				bleat_list.append(Search.search_bleat_by_bleat_ID(bleat))
			except:
				continue
		for bleat in sorted(bleat_list,key=getKey,reverse=True):
			string += bleat.format_bleat()
		return open(base+"bleat_panel.html").read().format(string)