本文整理匯總了Python中newebe.apps.pictures.models.PictureManager.get_last_pictures方法的典型用法代碼示例。如果您正苦於以下問題:Python PictureManager.get_last_pictures方法的具體用法?Python PictureManager.get_last_pictures怎麽用?Python PictureManager.get_last_pictures使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類newebe.apps.pictures.models.PictureManager
的用法示例。
在下文中一共展示了PictureManager.get_last_pictures方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: and_one_activity_for_first_picture_with_one_error_for_my_contact
# 需要導入模塊: from newebe.apps.pictures.models import PictureManager [as 別名]
# 或者: from newebe.apps.pictures.models.PictureManager import get_last_pictures [as 別名]
def and_one_activity_for_first_picture_with_one_error_for_my_contact(step):
author = world.browser.user
world.contact = world.browser2.user.asContact()
world.picture = PictureManager.get_last_pictures().first()
world.activity = Activity(
author=author.name,
verb="posts",
docType="picture",
docId=world.picture._id,
)
world.activity.add_error(world.contact)
world.activity.save()
示例2: and_i_add_one_deletion_activity_for_first_picture_with_one_error
# 需要導入模塊: from newebe.apps.pictures.models import PictureManager [as 別名]
# 或者: from newebe.apps.pictures.models.PictureManager import get_last_pictures [as 別名]
def and_i_add_one_deletion_activity_for_first_picture_with_one_error(step):
author = world.browser.user
world.contact = world.browser2.user.asContact()
world.picture = PictureManager.get_last_pictures().first()
world.activity = Activity(
author=author.name,
verb="deletes",
docType="picture",
docId=world.picture._id,
method="PUT"
)
date = date_util.get_db_date_from_date(world.picture.date)
world.activity.add_error(world.contact, extra=date)
world.activity.save()
示例3: when_i_get_last_pictures
# 需要導入模塊: from newebe.apps.pictures.models import PictureManager [as 別名]
# 或者: from newebe.apps.pictures.models.PictureManager import get_last_pictures [as 別名]
def when_i_get_last_pictures(step):
world.pictures = PictureManager.get_last_pictures().all()
示例4: clear_all_pictures
# 需要導入模塊: from newebe.apps.pictures.models import PictureManager [as 別名]
# 或者: from newebe.apps.pictures.models.PictureManager import get_last_pictures [as 別名]
def clear_all_pictures(step):
pictures = PictureManager.get_last_pictures()
while pictures:
for picture in pictures:
picture.delete()
pictures = PictureManager.get_last_pictures()
示例5: when_i_get_pictures_until_november_2
# 需要導入模塊: from newebe.apps.pictures.models import PictureManager [as 別名]
# 或者: from newebe.apps.pictures.models.PictureManager import get_last_pictures [as 別名]
def when_i_get_pictures_until_november_2(step):
world.pictures = PictureManager.get_last_pictures(
"2011-11-02T23:59:00Z").all()