def post(self, request, tablename=None, rowid=None):
        klass = get_model(tablename)
        dbrow = webhelpers.get_row(klass, rowid)
        try:
            webhelpers.update_row(request.POST, klass, dbrow)
        except types.ValidationError, err:
            webhelpers.dbsession.rollback()
            title = (tablename, dbrow) % "Re-edit %s %s"
            resp = self.get_response(request, title=title)
            resp.new_para(title)
            form = resp.add_form(action=request.get_url(edit, tablename=tablename, rowid=rowid))
            webhelpers.build_edit_form(form, klass, dbrow, err)
            return resp.finalize()

        try:
            webhelpers.dbsession.commit()
        except (DataError, IntegrityError), err:
            webhelpers.dbsession.rollback()
            title = "Re-edit %s %s" % (tablename, dbrow)
            resp = self.get_response(request, title=title)
            resp.new_para(title)
            form = resp.add_form(action=request.get_url(edit, tablename=tablename, rowid=rowid))
            webhelpers.build_edit_form(form, klass, dbrow, err)
            return resp.finalize()
        else:
            return framework.HttpResponseRedirect(request.get_url(listtable, tablename=tablename))
dataset/ETHPy150Open kdart/pycopia/storage/pycopia/db/webservice.py/EditRequestHandler.post/swapped operands of `%`