本文整理汇总了Python中models.List.get方法的典型用法代码示例。如果您正苦于以下问题:Python List.get方法的具体用法?Python List.get怎么用?Python List.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类models.List
的用法示例。
在下文中一共展示了List.get方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_post_update
# 需要导入模块: from models import List [as 别名]
# 或者: from models.List import get [as 别名]
def test_post_update(self):
response = self.post("/admin/api/v1/service-lists/foo",
data={"name": "bar"})
self.assertEquals(response.headers["Content-Type"], "application/json")
self.assertEquals(response.status_code, 200)
service = List.get(self.service_list.key())
self.assertEquals(service.name, "bar")
示例2: test_post_update_desc
# 需要导入模块: from models import List [as 别名]
# 或者: from models.List import get [as 别名]
def test_post_update_desc(self):
response = self.post("/admin/api/v1/service-lists/foo",
data={"description": "hello"})
self.assertEquals(response.headers["Content-Type"], "application/json")
self.assertEquals(response.status_code, 200)
service = List.get(self.service_list.key())
self.assertEquals(service.description, "hello")
示例3: get_List_Object
# 需要导入模块: from models import List [as 别名]
# 或者: from models.List import get [as 别名]
def get_List_Object(market):
listObject = List.get(List.market == market)
return listObject
示例4: get_Mini_Sellers_ListNumbers
# 需要导入模块: from models import List [as 别名]
# 或者: from models.List import get [as 别名]
def get_Mini_Sellers_ListNumbers(sellersListName):
sellersListNumbers = []
sellersList = List.get(List.name == sellersListName)
for listRelationship in ListRelationship.select().where(ListRelationship.listName == sellersList):
sellersListNumbers.append(listRelationship.number)
return sellersListNumbers
示例5: get_Mini_List
# 需要导入模块: from models import List [as 别名]
# 或者: from models.List import get [as 别名]
def get_Mini_List(name):
l = List.get(List.name == name)
return l
示例6: get_Mini_Sellers_List
# 需要导入模块: from models import List [as 别名]
# 或者: from models.List import get [as 别名]
def get_Mini_Sellers_List(seller, name):
l = List.get(List.name == name and List.seller == seller)
return l
示例7: get
# 需要导入模块: from models import List [as 别名]
# 或者: from models.List import get [as 别名]
def get(self, list_id=None):
if not list_id:
return self._get_all()
_list = objList.get(list_id)
return jsonify(_list)