当前位置: 首页>>代码示例>>Python>>正文


Python Ticket.gets_by_proj方法代码示例

本文整理汇总了Python中vilya.models.ticket.Ticket.gets_by_proj方法的典型用法代码示例。如果您正苦于以下问题:Python Ticket.gets_by_proj方法的具体用法?Python Ticket.gets_by_proj怎么用?Python Ticket.gets_by_proj使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vilya.models.ticket.Ticket的用法示例。


在下文中一共展示了Ticket.gets_by_proj方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: open_pulls

# 需要导入模块: from vilya.models.ticket import Ticket [as 别名]
# 或者: from vilya.models.ticket.Ticket import gets_by_proj [as 别名]
 def open_pulls(self):
     from vilya.models.ticket import Ticket
     from vilya.models.pull import PullRequest
     pulls = [PullRequest.get_by_proj_and_ticket(self.id,
                                                 t.ticket_id)
              for t in Ticket.gets_by_proj(self.id,
                                           limit=9999)]
     return pulls
开发者ID:000fan000,项目名称:code,代码行数:10,代码来源:project.py

示例2: get_tickets

# 需要导入模块: from vilya.models.ticket import Ticket [as 别名]
# 或者: from vilya.models.ticket.Ticket import gets_by_proj [as 别名]
 def get_tickets(self, project, page, closed=False):
     tickets = Ticket.gets_by_proj(
         project.id, closed=closed, limit=TICKETS_COUNT_PER_PAGE,
         start=TICKETS_COUNT_PER_PAGE * (int(page) - 1))
     if closed:
         tickets = sorted(tickets, key=lambda x: x.closed, reverse=True)
     ticket_total_len = Ticket.get_count_by_proj(project.id, closed=closed)
     return tickets, ticket_total_len
开发者ID:000fan000,项目名称:code,代码行数:10,代码来源:pull.py

示例3: _index

# 需要导入模块: from vilya.models.ticket import Ticket [as 别名]
# 或者: from vilya.models.ticket.Ticket import gets_by_proj [as 别名]
    def _index(self, request):
        project = CodeDoubanProject.get_by_name(self.proj_name)
        open_tickets = Ticket.gets_by_proj(project.id, limit=9999)

        pr_list = []
        for t in open_tickets:
            pullreq = PullRequest.get_by_proj_and_ticket(project.id,
                                                         t.ticket_number)
            if pullreq:
                pr_list.append(pullreq.as_dict())
        return pr_list
开发者ID:000fan000,项目名称:code,代码行数:13,代码来源:pulls.py

示例4: open_network_pulls

# 需要导入模块: from vilya.models.ticket import Ticket [as 别名]
# 或者: from vilya.models.ticket.Ticket import gets_by_proj [as 别名]
 def open_network_pulls(self):
     from vilya.models.ticket import Ticket
     from vilya.models.pull import PullRequest
     pulls = []
     projects = self.get_fork_network()
     for project in projects:
         ps = [PullRequest.get_by_proj_and_ticket(project.id,
                                                  t.ticket_id)
               for t in Ticket.gets_by_proj(project.id,
                                            limit=9999)]
         pulls.extend([p for p in ps
                       if p and p.from_proj and p.from_proj.id == self.id])
     return pulls + self.open_pulls
开发者ID:000fan000,项目名称:code,代码行数:15,代码来源:project.py

示例5: open_parent_pulls

# 需要导入模块: from vilya.models.ticket import Ticket [as 别名]
# 或者: from vilya.models.ticket.Ticket import gets_by_proj [as 别名]
 def open_parent_pulls(self):
     from vilya.models.ticket import Ticket
     from vilya.models.pull import PullRequest
     pulls = []
     parent = self.get_forked_from()
     if parent:
         pulls = [PullRequest.get_by_proj_and_ticket(parent.id,
                                                     t.ticket_id)
                  for t in Ticket.gets_by_proj(parent.id,
                                               limit=9999)]
         pulls = [p for p in pulls
                  if p and p.from_proj and p.from_proj.id == self.id]
     return pulls
开发者ID:000fan000,项目名称:code,代码行数:15,代码来源:project.py

示例6: test_ticket_gets_by_proj

# 需要导入模块: from vilya.models.ticket import Ticket [as 别名]
# 或者: from vilya.models.ticket.Ticket import gets_by_proj [as 别名]
 def test_ticket_gets_by_proj(self):
     title = 'test title'
     desc = 'test desc'
     author = 'testuser'
     Ticket.add(self.proj1.id, title, desc, author)
     assert Ticket.gets_by_proj(self.proj1.id)
开发者ID:leeccong,项目名称:code,代码行数:8,代码来源:test_ticket.py


注:本文中的vilya.models.ticket.Ticket.gets_by_proj方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。