Пример #1
0
def find_lanes_by_ogc_fid(id):
    try:
        laneList = Lane()
    except RuntimeError as exc:
        mensaje, codigo = exc.args
        response = {codigo: mensaje}
        return Response(json.dumps(response),
                        mimetype='application/json',
                        status=codigo)
    try:
        lane = laneList.find_by_ogc_fid(id)
    except ValueError:
        response = {'404': 'Bici lane ogc-fid {} not found'.format(id)}
        return Response(json.dumps(response),
                        mimetype='application/json',
                        status=404)
    return Response(json.dumps(lane), mimetype='application/json', status=200)
def find_by_ogc_fid(id):
    laneList = Lane()
    return laneList.find_by_ogc_fid(id)