def order_list(): ''' 订单列表 ''' if request.method == 'GET': route = session.get('route') #search = request.form['search'] db = DBOpera() orders = db.get_orderList() return render_template('manage_orderlist.html', orders=orders) #TODO(caoyue):在图书表中查找图书 if request.method == 'POST': route = session.get('route') keyword = request.form['keyword'] db = DBOpera() orders = db.get_orderList(keyword) return render_template('manage_orderlist.html', orders=orders)
def user_order(): '''用户订单列表''' db = DBOpera() if request.method == 'GET': order_lists = db.get_orderList(current_user.user_name) return render_template('user_order_list.html', order_lists=order_lists)