def POST(self): form = addressForm() if not form.validates(): result = data.getAllLocations() return render.locations(locationSet=result, form=form) else: data.addLocation(form.d, GMapsAPIKey) result = data.getAllLocations() return render.locations(locationSet=result, form=form)
def GET(self): form = addressForm() result = data.getAllLocations() return render.locations(locationSet=result, form=form)
def prepareLocationSet(): locationSet = list(data.getAllLocations()) for location in locationSet: if location.latitude is None: data.geocode(location, GMapsAPIKey)
def GET(self,id): prepareLocationSet() locationSet = list(data.getAllLocations()) kmlSet = list(data.getAllOverlays()) return render.showMapV3(id=id, locationSet=locationSet, kmlSet=kmlSet)
def GET(self, id): db.delete(id) result = data.getAllLocations() web.seeother('/locations')