def order_page(): items = [] stock = [] pythonToDb.getStock() items = pythonToDb.getItemList() stock = pythonToDb.getNumInStockList() data = "" counter = 0 for item in items: data += item + " Quantity: " + stock[counter] + " " counter += 1 return render_template('order.html', data=data)
def admin_page(): items = [] stock = [] pythonToDb.getStock() items = pythonToDb.getItemList() stock = pythonToDb.getNumInStockList() data = "" counter = 0 for item in items: data += item + " Quantity: " + stock[counter] + " " counter += 1 # Call method to return list of items and stock here return render_template('admin.html', data=data)
def order_page(): # declaring lists to store database info items = [] stock = [] pythonToDb.getStock() items = pythonToDb.getItemList() stock = pythonToDb.getNumInStockList() data = "" counter = 0 # cleaning lists into one string to pass to HTML file for item in items: data += item + " Quantity: " + stock[counter] + " " counter += 1 return render_template('order.html', data=data)