def request_join_data(url, search_str, n): if url != '/request_join': raise dash.exceptions.PreventUpdate() game_id = int(parse_url.parse_url_id(search_str)) print(game_id) request_data = campus_map.get_data_request(db, game_id, n) return request_data
def display_info(url, search_str): if url != '/contact_renter': raise dash.exceptions.PreventUpdate() my_id = parse_url.parse_url_id(search_str) print(my_id) my_list = [] my_list.append("/rent_game?id=" + my_id) return my_list
def join_game_data(url, search_str): if url != '/join_game': raise dash.exceptions.PreventUpdate() game_id = int(parse_url.parse_url_id(search_str)) print(game_id) game_data = campus_map.get_data_game(db, game_id) return game_data
def display_info(url, search_str): if url != '/rent_game': raise dash.exceptions.PreventUpdate() my_id = parse_url.parse_url_id(search_str) print(my_id) my_list = [] my_list.append(get_data_from_db.rent_get_name()[int(my_id) - 1]) my_list.append( str(get_data_from_db.rent_get_price()[int(my_id) - 1]) + str(" €")), my_list.append(get_data_from_db.rent_get_description()[int(my_id) - 1]), my_list.append("/assets/images/" + get_data_from_db.rent_get_img()[int(my_id) - 1]) my_list.append("/contact_renter?id=" + my_id) return my_list
def display_info(url, search_str): if url != '/see_exchange_game': raise dash.exceptions.PreventUpdate() print(search_str) my_id = parse_url.parse_url_id(search_str) print(my_id) my_list = [] my_list.append("WANTS " + get_data_from_db.exchange_get_wanted()[int(my_id) - 1]) my_list.append("OFFERS " + get_data_from_db.exchange_get_offered()[int(my_id) - 1]), my_list.append(get_data_from_db.exchange_get_description()[int(my_id) - 1]), my_list.append("/assets/images/" + get_data_from_db.exchange_get_img()[int(my_id) - 1]) my_list.append("/contact_exchange?id=" + my_id) return my_list