本文整理匯總了Python中agilito.models.UserStory.backlogged方法的典型用法代碼示例。如果您正苦於以下問題:Python UserStory.backlogged方法的具體用法?Python UserStory.backlogged怎麽用?Python UserStory.backlogged使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類agilito.models.UserStory
的用法示例。
在下文中一共展示了UserStory.backlogged方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: backlog
# 需要導入模塊: from agilito.models import UserStory [as 別名]
# 或者: from agilito.models.UserStory import backlogged [as 別名]
def backlog(request, project_id):
user_stories = UserStory.backlogged(project=project_id).order_by('position')
planned = sum(i.planned for i in user_stories if i.planned)
todo = sum(i.remaining for i in user_stories)
estimated = sum(i.estimated for i in user_stories)
actuals = sum(i.actuals for i in user_stories)
failures = sum(i.test_failed for i in user_stories)
context = AgilitoContext(
request,
current_project=project_id,
dictionary={
'planned' : planned,
'remaining' : todo,
'estimated' : estimated,
'actuals' : actuals,
'failures' : failures,
}
)
return list_detail.object_list(
request,
user_stories,
template_name = 'agilito/backlog.html',
extra_context = context
)