本文整理汇总了Python中vilya.models.project_issue.ProjectIssue.gets_by_target方法的典型用法代码示例。如果您正苦于以下问题:Python ProjectIssue.gets_by_target方法的具体用法?Python ProjectIssue.gets_by_target怎么用?Python ProjectIssue.gets_by_target使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vilya.models.project_issue.ProjectIssue
的用法示例。
在下文中一共展示了ProjectIssue.gets_by_target方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get
# 需要导入模块: from vilya.models.project_issue import ProjectIssue [as 别名]
# 或者: from vilya.models.project_issue.ProjectIssue import gets_by_target [as 别名]
def get(self, request):
page = int(request.get_form_var('page', 1))
count = int(request.get_form_var('count', 25))
start = (page - 1) * count
state = request.get_form_var('state', None)
project = self.project
project_issues = ProjectIssue.gets_by_target(project.id, state=state,
start=start, limit=count)
return [issue.as_dict() for issue in project_issues]