Esempio n. 1
0
def add_location(name):
    whileLoop = 0
    while whileLoop == 0:
        name = str(name)
        locations = get_location()
        locations.append(name)
        write_location(locations)
        whileLoop = 1
    redirect('/')
Esempio n. 2
0
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('/')