def __generateBrief(self, o): res = {} tender = o.Tender city = o.City res.update(Tender.generateBrief(tender=tender)) res.update(City.generate(city=city)) return res
def __generateTender(self, t): tender = t.Tender city = t.City res = {} res.update(Tender.generate(tender=tender)) res.update(City.generate(city=city)) # # 列表中不带详情 # if tag is not None: # del res['detail'] # else: # # 详情中的情况 # favorite = t.Favorite # if favorite is not None: # res['favorite'] = True # else: # res['favorite'] = False return res
def __generateTender(self, t): res = {} res.update(Tender.generateBrief(tender=t.Tender)) res.update(City.generate(city=t.City)) return res
def __generateBidding(self, b): res = {} res.update(WinBiddingPub.generateBrief(result=b.WinBiddingPub)) res.update(City.generate(city=b.City)) return res
def __generateBiddingDetail(self, b): res = {} res.update(WinBiddingPub.generate(b=b.WinBiddingPub)) res.update(City.generate(city=b.City)) return res
def __generateCity(self, c): res = {} res.update(City.generate(city=c)) return res