本文整理汇总了Python中vilya.models.project_issue.ProjectIssue.gets_by_project_ids方法的典型用法代码示例。如果您正苦于以下问题:Python ProjectIssue.gets_by_project_ids方法的具体用法?Python ProjectIssue.gets_by_project_ids怎么用?Python ProjectIssue.gets_by_project_ids使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vilya.models.project_issue.ProjectIssue
的用法示例。
在下文中一共展示了ProjectIssue.gets_by_project_ids方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _q_index
# 需要导入模块: from vilya.models.project_issue import ProjectIssue [as 别名]
# 或者: from vilya.models.project_issue.ProjectIssue import gets_by_project_ids [as 别名]
def _q_index(request):
user = request.user
my_issues = []
if user:
username = user.username
your_projects = CodeDoubanProject.get_projects(owner=username,
sortby='lru')
watched_projects = CodeDoubanProject.get_watched_others_projects_by_user( # noqa
user=username,
sortby='lru')
teams = Team.get_by_user_id(user.name)
actions = get_user_inbox(username).get_actions(
stop=PAGE_ACTIONS_COUNT - 1)
badge_items = user.get_badge_items()
# pull request
# your_tickets = user.get_user_pull_requests_rank(limit=5)
your_tickets = user.get_user_submit_pull_requests(limit=5)
# issue
project_ids = CodeDoubanProject.get_ids(user.name)
dt = {
'state': "open",
'limit': 5,
'start': 0,
}
my_issues = ProjectIssue.gets_by_project_ids(project_ids, **dt)
return st('newsfeed.html', **locals())
return request.redirect("/teams/")
示例2: test_gets_by_project_ids
# 需要导入模块: from vilya.models.project_issue import ProjectIssue [as 别名]
# 或者: from vilya.models.project_issue.ProjectIssue import gets_by_project_ids [as 别名]
def test_gets_by_project_ids(self):
ProjectIssue.add('test1', 'desp', 'test', project=1)
ProjectIssue.add('test2', 'desp', 'test2', project=2)
ProjectIssue.add('test3', 'desp', 'test3', project=2)
issues = ProjectIssue.gets_by_project_ids([1, 2])
assert len(issues), 3
示例3: test_gets_by_project_ids
# 需要导入模块: from vilya.models.project_issue import ProjectIssue [as 别名]
# 或者: from vilya.models.project_issue.ProjectIssue import gets_by_project_ids [as 别名]
def test_gets_by_project_ids(self):
p1 = ProjectIssue.add('test1', 'desp', 'test', project=1)
p2 = ProjectIssue.add('test2', 'desp', 'test2', project=2)
p3 = ProjectIssue.add('test3', 'desp', 'test3', project=2)
issues = ProjectIssue.gets_by_project_ids([1, 2])
assert len(issues), 3
for p in [p1, p2, p3]:
p.delete()