Beispiel #1
0
def post_hotel(request):
    # get request parameters        
    name = request.get('name')
    address = request.get('address')
    lat = float(request.get('lat'))
    lng = float(request.get('lng'))
    place.add_hotel(name, address, lat, lng)
Beispiel #2
0
def post_hotel(request):
    # get request parameters        
    name = request.get('name')
    name_rus = request.get('nameRus')
    file_name = request.get('fileName')
    rating = float(request.get('rating'))
    image_id = request.get('imageId')
    address = request.get('address')
    address_rus = request.get('addressRus')
    min_rate = float(request.get('minRate')) if request.get('minRate') != '' else None 
    lat = float(request.get('lat'))
    lng = float(request.get('lng'))
    hotel_type = request.get('type')
    place.add_hotel(name, name_rus, file_name, rating, image_id, address, address_rus, min_rate, lat, lng, hotel_type)