本文整理汇总了Python中models.order.Order.orderIsVerified方法的典型用法代码示例。如果您正苦于以下问题:Python Order.orderIsVerified方法的具体用法?Python Order.orderIsVerified怎么用?Python Order.orderIsVerified使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类models.order.Order
的用法示例。
在下文中一共展示了Order.orderIsVerified方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get
# 需要导入模块: from models.order import Order [as 别名]
# 或者: from models.order.Order import orderIsVerified [as 别名]
def get(self):
tCode = re.sub(r"\W", "", self.request.get("code")).lower()
tOrderId = self.request.get("id")
logging.debug(tCode)
tOrder = Order()
# tOrder.orderVerificationCode
tOrderQuery = Order().all()
tOrderQuery.filter("orderVerificationCode", tCode)
if tOrderId:
tOrderQuery.filter("orderTransactionId", tOrderId)
tOrderList = tOrderQuery.fetch(limit=1)
logging.debug(str(tOrderList))
tSave = False
if tOrderList is not None:
try:
tOrder = tOrderList[0]
tOrder.orderIsVerified = True
tSave = True
except:
if len(tOrderList) > 0:
tOrder = tOrderList
tOrder.orderIsVerified = True
tSave = True
if tSave:
try:
tOrder.put()
except:
pass