예제 #1
0
def remove_cart():

    if request.method == 'POST':
        name = request.form['name']
        remove_from_cart(name)
        return redirect(url_for('cart'))

    return redirect(url_for('cart'))
예제 #2
0
def remove_cart():
    product_id = str(request.form['product_id'])
    remove_from_cart(session['username'], product_id)
    return redirect(url_for('cart'))