def strikeUndo(sid): schedule = ScheduleTable.select(sid, 0, 'id') name = schedule[0].s_name user = UserTable.select(sid, name, 'name') duty = user[0].time_duty + 1 ScheduleTable.update(sid, '1') UserTable.update(name, duty)
def GET(self, sid): schedule = ScheduleTable.select(sid, 0, 'id') name = schedule[0].s_name user = UserTable.select(0, name, 'name') duty = user[0].time_duty + 1 ScheduleTable.update(sid, '1') UserTable.update(name, duty) raise web.seeother('/schedule/data')