def order(orderNo): u = current_user() o = Order.find_one(orderNo=orderNo) if o is not None and o.user_id == u.id: return render_template('user/order.html', o=o, u=u) else: return redirect(url_for('user.orders'))
def order_delivery(orderNo): o = Order.find_one(orderNo=orderNo) o.delivery() return redirect(url_for('admin.order_list'))
def order_edit(orderNo): u = current_user() m = Order.find_one(orderNo=orderNo) m.user = User.get(m.user_id) m.ct = time_str(m.ct) return render_template('admin_order_edit.html', o=m, u=u)