def nametownship(ids): if request.get_header('Accept') and request.get_header( 'Accept') == 'application/json': response.content_type = 'application/json' catasto = Catasto() townships = [] idgeom = 0 for id in ids.split(','): townships += catasto.nameGeoTowhship(id.strip(), idgeom) idgeom += 1 return catasto.joinGeoJSON(townships)
def nametownship(id): catasto = Catasto() return catasto.nameGeoTowhship(id)