示例#1
0
def update(id):
    temp = Lugar.get(id)
    data = request.get_json()
    if not temp or not data or not Lugar.valid(data):
        abort(404)
    return Lugar.update(id, data)
示例#2
0
def destroy(id):
    temp = Lugar.get(id)
    if not temp: abort(404)
    return Lugar.remove(id)
示例#3
0
def show(id):
     return jsonify(Lugar.get(id))