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'))
def index(): booklist = Item.query() session['booklist'] = booklist return render_template('index.html')
def seller_index(): session['item_data'] = Item.query(order=None) session['allorder_data'] = Lineitem.get_allorder_list() return render_template('sellerindex.html')
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'))
def customer_index(): booklist = Item.query() session['booklist'] = booklist session['customer_data'] = Customer.query() return render_template('customerindex.html')