def GET(self, agid): agency = model.get_agency(agid) agencyhashouse = model.get_aghashouse(agid) print agencyhashouse form = self.form() form.fill(agency) return render.showAgency(agency, form, agencyhashouse)
def POST(self, agid): form = self.form() agencyhashouse = model.get_aghashouse(agid) agency = model.get_agency(agid) if not form.validates(): raise web.seeother('/agencies') if model.hsoccupied(form.d.Choose_House)==0: model.update_agency(agid, form.d.Telephone, form.d.location) model.agencywantshouse(agid, form.d.Choose_House) raise web.seeother('/agencies')