本文整理汇总了Python中vilya.models.ticket.Ticket.get_count_by_team_id方法的典型用法代码示例。如果您正苦于以下问题:Python Ticket.get_count_by_team_id方法的具体用法?Python Ticket.get_count_by_team_id怎么用?Python Ticket.get_count_by_team_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vilya.models.ticket.Ticket
的用法示例。
在下文中一共展示了Ticket.get_count_by_team_id方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _q_index
# 需要导入模块: from vilya.models.ticket import Ticket [as 别名]
# 或者: from vilya.models.ticket.Ticket import get_count_by_team_id [as 别名]
def _q_index(self, request):
user = request.user
team = self.team
page = request.get_form_var('page', 1)
tickets = Ticket.gets_by_team_id(
team.id, limit=TICKETS_COUNT_PER_PAGE,
start=TICKETS_COUNT_PER_PAGE * (int(page) - 1)) or []
ticket_total_len = Ticket.get_count_by_team_id(team.id) or 0
is_closed_tab = False
n_pages = (ticket_total_len - 1) / TICKETS_COUNT_PER_PAGE + 1
return st('/teams/team_pulls.html', **locals())
示例2: n_tickets
# 需要导入模块: from vilya.models.ticket import Ticket [as 别名]
# 或者: from vilya.models.ticket.Ticket import get_count_by_team_id [as 别名]
def n_tickets(self):
return Ticket.get_count_by_team_id(self.id)