Esempio n. 1
0
def alteritem(item_id):
    form = request.form
    itemname = form.get('itemname')
    itemprice = form.get('itemprice')
    itemimage = form.get('itemimage')
    discount = form.get('discount')
    threshold = form.get('threshold')
    percentage = form.get('percentage')
    Item.alteritem(item_id, itemname, itemprice, itemimage, discount,
                   threshold, percentage)
    session['item_data'] = Item.query(order=None)
    return redirect(url_for('seller_index'))
Esempio n. 2
0
def index():
    booklist = Item.query()
    session['booklist'] = booklist
    return render_template('index.html')
Esempio n. 3
0
def seller_index():
    session['item_data'] = Item.query(order=None)
    session['allorder_data'] = Lineitem.get_allorder_list()
    return render_template('sellerindex.html')
Esempio n. 4
0
def delete_item1(item_id):
    Item.delete_item_from_DB(item_id)
    session['item_data'] = Item.query(order=None)
    return redirect(url_for('seller_index'))
Esempio n. 5
0
def customer_index():
    booklist = Item.query()
    session['booklist'] = booklist
    session['customer_data'] = Customer.query()
    return render_template('customerindex.html')