def get_lane_count(): try: laneList = Lane() except RuntimeError as exc: mensaje, codigo = exc.args response = {codigo: mensaje} return Response(json.dumps(response), mimetype='application/json', status=codigo) return Response(json.dumps({'count': laneList.count()}), mimetype='application/json', status=200)
def get_count(): laneList = Lane() return laneList.count()