Beispiel #1
0
    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)
Beispiel #2
0
    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)
Beispiel #3
0
    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)
Beispiel #4
0
    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)