Ejemplo n.º 1
0
	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)
Ejemplo n.º 2
0
	def GET(self):
		form = addressForm()
		result = data.getAllLocations()
		return render.locations(locationSet=result, form=form)
Ejemplo n.º 3
0
def prepareLocationSet():
	locationSet = list(data.getAllLocations())
	for location in locationSet:
		if location.latitude is None:
			data.geocode(location, GMapsAPIKey)
Ejemplo n.º 4
0
	def GET(self,id):
		prepareLocationSet()
       		locationSet = list(data.getAllLocations())
		kmlSet = list(data.getAllOverlays())
		return render.showMapV3(id=id, locationSet=locationSet, kmlSet=kmlSet)
Ejemplo n.º 5
0
	def GET(self, id):
		db.delete(id)
		result = data.getAllLocations()
		web.seeother('/locations')