def post(self,areaid, area, id2, name2): name = self.get_argument('placename') placetype = self.get_argument('type', ) address = self.get_argument('address') phone = self.get_argument('phone', 0) introduction = self.get_argument('introduction') site = self.get_argument('site') price = self.get_argument('price') traffic = self.get_argument('traffic') businesshours = self.get_argument('businesshours') #parentplaceid = self.get_argument('parentplaceid', None) #parentplacename = self.get_argument('parentplacename', None) info = dict(name=name, area=area, areaid=areaid, placetype=placetype, address=address, phone=phone, introduction=introduction, site=site, price=price, traffic=traffic, createtime=time.time(), parentplaceid = id2, parentplacename = name2, businesshours=businesshours) DButils.writePlaceInfo(info) items = DButils.readPlaceInfo(areaid) self.render('place.html', items=items, id=areaid, name=area, )
def get(self): proitems = DButils.readProInfo() print proitems areaitems = DButils.readAreaInfo() areas = dict() for item in areaitems: areas.setdefault(item['provinceid'], []) areas[item['provinceid']].append(item) return self.render('sidebar.html', items=proitems, areas=areas )
def post(self,areaid, area): name = self.get_argument('placename') introduction = self.get_argument('introduction') info = dict(name=name, area=area, areaid=areaid, introduction=introduction, createtime=time.time(), ) DButils.writePoiInfo(info) items = DButils.readPoiInfo(areaid) self.render('feature.html', items=items, id=areaid, name=area,)
def post(self,areaid, area): #print self.request.files #file_dict_list = self.request.files['img'] #for file_dict in file_dict_list: #filename = file_dict["filename"] #f = open("imgfile/upload/%s" % areaid, "wb") #f.write(file_dict["body"]) #f.close() name = self.get_argument('placename') introduction = self.get_argument('introduction') info = dict(name=name, area=area, areaid=areaid, introduction=introduction, createtime=time.time(), ) DButils.writePoiInfo(info) items = DButils.readPoiInfo(areaid) self.render('poi.html', items=items, id=areaid, name=area,)
def post(self,areaid, area): print self.request.files file_dict_list = self.request.files['img'] for file_dict in file_dict_list: filename = file_dict["filename"] f = open("imgfile/upload/%s" % areaid, "wb") f.write(file_dict["body"]) f.close() name = self.get_argument('placename') placetype = self.get_argument('type', ) address = self.get_argument('address') phone = self.get_argument('phone', 0) introduction = self.get_argument('introduction') site = self.get_argument('site') price = self.get_argument('price') traffic = self.get_argument('traffic') businesshours = self.get_argument('businesshours') info = dict(name=name, area=area, areaid=areaid, placetype=placetype, address=address, phone=phone, introduction=introduction, site=site, price=price, traffic=traffic, createtime=time.time(), parentplaceid = None, parentplacename = None, businesshours=businesshours) DButils.writePlaceInfo(info) items = DButils.readPlaceInfo(areaid) self.render('place.html', items=items, id=areaid, name=area)
def get(self, id, name): items = DButils.readPlaceInfo(id) return self.render('place.html', items=items, id=id, name=name)
def get(self, id, name): items = DButils.readPoiInfo(id) return self.render('poiadmin.html', items=items, id=id, name=name)