Exemple #1
0
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())
Exemple #2
0
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())
Exemple #3
0
def room_all():
    dao = Room()
    return template("room/all", rooms = dao.get_all())