def main(req): """ <table> <tr> <td>本次招募</td><td><img src=''></td> </tr> </table> """ """ josn: [ {"img":""}, {"img":""} ] """ resultList = indexService.getNextIndex() jsonList = [] page = '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><table><tr>' for person in resultList: jsonList.append(JsonUtil.object2Dict(person)) if '招募' in person.img: page+='<td>本次招募</td>' else: page+='<td><img src='+person.img+'></td>' page+='</tr><tr>' for person in resultList: if '招募' in person.img: page+='<td>技能</td>' else: page+='<td>'+person.skill+'</td>' page+='</tr></table>' page+='</br>json:'+ json.dumps(jsonList).decode("unicode-escape") return HttpResponse(page)
def getScroe(req): resultList = scroeLineService.getScroe() jsonList = [] for person in resultList: jsonList.append(JsonUtil.object2Dict(person)) return HttpResponse(json.dumps(jsonList).decode("unicode-escape"))
def getEventList(req): eventList = eventService.getEventList() jsonList = [] for event in eventList: jsonList.append(JsonUtil.object2Dict(event)) return HttpResponse(json.dumps(jsonList).decode("unicode-escape"))
def getNextRecruit(req): resultList = indexService.getNextIndex() jsonList = [] for person in resultList: jsonList.append(JsonUtil.object2Dict(person)) return HttpResponse(json.dumps(jsonList).decode("unicode-escape"))