def confirm_all(order_id): order = get_object_or_404(UserOrder, id=order_id) status = get_object_or_404(OrderStatus, name="confirmed") UserOrder.update(is_confirmed=True, status=status, confirm_date=dt.today()).where(id=order_id).execute() point = g.user.point point += order.total_price() User.update(point=point).where(id=g.user.id).execute() return render_template("cart/success.html", user=g.user, order=order)