本文整理汇总了Python中models.project.Project.set_sub_items方法的典型用法代码示例。如果您正苦于以下问题:Python Project.set_sub_items方法的具体用法?Python Project.set_sub_items怎么用?Python Project.set_sub_items使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类models.project.Project
的用法示例。
在下文中一共展示了Project.set_sub_items方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: set_sub_items
# 需要导入模块: from models.project import Project [as 别名]
# 或者: from models.project.Project import set_sub_items [as 别名]
def set_sub_items(self, api_count):
""" (int)
Set the projects for the organization
"""
# Get all of our projects in that organization and loop through them
project_list = self.api_organization.projects.get()
api_count = check_throttle(api_count)
for project in project_list:
# Print out the project name and slug
#print Fore.BLUE + "\t%s\t%s" % (project['name'],project['slug'])
new_project = Project(json = project, api = self.api_organization)
new_project.set_sub_items(api_count)
self.add_project(new_project)