本文整理匯總了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