def room_edit(id): dao = Room() if saved(request.GET): dao.update(request.GET) redirect('/room/all') else: return template("room/edit", room = dao.get(id), departments = Department().get_all())
def room_new(): if saved(request.GET): dao = Room() dao.insert(request.GET) redirect('/room/all') else: dao = Department() return template("room/new", departments = dao.get_all())
def room_all(): dao = Room() return template("room/all", rooms = dao.get_all())