def add_location(name): whileLoop = 0 while whileLoop == 0: name = str(name) locations = get_location() locations.append(name) write_location(locations) whileLoop = 1 redirect('/')
def del_location(name): whileLoop = 0 while whileLoop == 0: name = str(name) if "_" in name: name = name.replace("_"," ") locations = list(get_location()) locations.remove(name) write_location(locations) whileLoop = 1 redirect('/')