本文整理汇总了Python中orders.models.Order.order_status方法的典型用法代码示例。如果您正苦于以下问题:Python Order.order_status方法的具体用法?Python Order.order_status怎么用?Python Order.order_status使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类orders.models.Order
的用法示例。
在下文中一共展示了Order.order_status方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Order
# 需要导入模块: from orders.models import Order [as 别名]
# 或者: from orders.models.Order import order_status [as 别名]
weight=4.5,
initials='WKB',
entered_date=datetime.datetime.now())
box.save()
#make order
fOrder = Order(order_number='testlockout', creation_date = datetime.datetime.now())
fOrder.save()
#add box to order
fOrderBox = OrderBox(order_for = fOrder, box = box)
fOrderBox.save()
#make second order
sOrder = Order(order_number='testlockout2', creation_date = datetime.datetime.now())
sOrder.save()
#add box to second order
sOrderBox = OrderBox(order_for = sOrder, box = box)
sOrderBox.save()
print str(fOrderBox)
print str(sOrderBox)
#Check that the box is in both orders
print box.is_locked_out()
print OrderBox.objects.filter(box=box)
fOrder.order_status = 'S'
fOrder.save()
#check that box is not in order 2 anymore
print box.is_locked_out()
print box.orderbox_set.all()