def GET(self, id):
     default_headers()
     id = id[1:]
     program = model.get_program(id)
     if not program:
         raise web.notfound()
     return json.dumps(program.big())
Exemple #2
0
 def POST(self, id):
     form = new_program.form()
     program = model.get_program(int(id))
     if not form.validates():
         return render.edit(program, form)
     model.update_program(int(id), form.d.day,form.d.hour_ini, form.d.hour_end, form.d.temp)
     raise web.seeother('/list_programs')
Exemple #3
0
 def POST(self, id):
     form = new_program.form()
     program = model.get_program(int(id))
     if not form.validates():
         return render.edit(program, form)
     model.update_program(int(id), form.d.day, form.d.hour_ini,
                          form.d.hour_end, form.d.temp)
     raise web.seeother('/list_programs')
Exemple #4
0
 def GET(self, id):
     program = model.get_program(int(id))
     form = new_program.form()
     form.fill(program)
     return render.edit(program, form)
Exemple #5
0
 def GET(self, id):
     program = model.get_program(int(id))
     form = new_program.form()
     form.fill(program)
     return render.edit(program, form)