def edit(self, id): c.vote = Vote.find_by_id(id) defaults = h.object_to_defaults(c.vote, 'vote') form = render('vote/edit.mako') return htmlfill.render(form, defaults)
def edit(self, id): c.vote = Vote.find_by_id(id) defaults = h.object_to_defaults(c.vote, 'vote') form = render('vote/edit.mako') return htmlfill.render(form, defaults)
def _edit(self, id): vote = Vote.find_by_id(id) for key in self.form_result['vote']: setattr(vote, key, self.form_result['vote'][key]) # update the objects with the validated form data meta.Session.commit() h.flash("The note has been updated successfully.") redirect_to(action='view', id=id)
def _edit(self, id): vote = Vote.find_by_id(id) for key in self.form_result['vote']: setattr(vote, key, self.form_result['vote'][key]) # update the objects with the validated form data meta.Session.commit() h.flash("The note has been updated successfully.") redirect_to(action='view', id=id)