Ejemplo n.º 1
0
def confirm_reserve_post(res_id):
    res = Order.get(res_id)
    if not res.order_items:
        return { "success": False}
    if not res.send_date:
        return { "success": False}
    res.update(is_confirmed=True, confirm_date=date2str(dt.today()))
    return {"success": True}
Ejemplo n.º 2
0
def confirm_reserve(res_id):
    user = request.user
    res = Order.get(res_id)
    if res.send_date:
        send_date= date2str(res.send_date)
    else:
        send_date= None
    return render('base/reservation_confirm.html')(
            user=user, res=res, send_date=send_date)
Ejemplo n.º 3
0
def check_out_post(order_id):
    order = Order.get(order_id)
    if not order.order_items:
        return { "success": False}
    order.update(is_confirmed=True, confirm_date=date2str(dt.today()))
    return {"success": True}