def POST(self, id): form = self.form() page = model.get_page_by_id(int(id)) if not form.validates(): return render.edit(page, form) model.update_page(int(id), form.d.url, form.d.title, form.d.content) raise web.seeother('/')
def GET(self, id): page = model.get_page_by_id(int(id)) form = self.form() form.fill(page) return render.edit(page, form)
def GET(self, id): form = self.form() page = model.get_page_by_id(id) form.fill(page) return render.Edit(form)