Пример #1
0
def remove_cart():

    if request.method == 'POST':

        product = request.form['name']

        remove_from_cart(product)

        return redirect(url_for('cart'))

    return redirect(url_for('cart'))
Пример #2
0
def remove_cart():
    product_name = request.form['product_name']
    remove_from_cart(product_name)
    return redirect(url_for('cart'))
Пример #3
0
def rmv_from_cart():
    if request.method == 'POST':
        print(request.form)
        product_id = request.form["product_id"]
        c = remove_from_cart(product_id, session["username"])
        return redirect(url_for('add_to_cart'))
Пример #4
0
def remove_cart():

    product_id = str(request.form['id'])
    remove_from_cart(product_id, session['username'])
    return redirect(url_for('cart'))