Hello, I’m working on Tourist Attractions:
I’m on step 10, where you have to make the buttons do their job (deleting or moving up a catergory)
My code looks like this:
def locations(category): locations = visit.get_list_by_category(category) if request.method == "Post": [(name, action)] = request.form.items() if action == UP_ACTION: visit.moveup(name) elif action == DEL_ACTION: visit.delete(name) return render_template("locations.html", category=category, categories=categories, locations=locations)
I don’t get any errors, but also the buttons don’t work. According to the instructions they should be working, and I cannot find why they don’t do anything. What did I miss? Or did I do something wrong?
Thanks in advance for any help