aboutsummaryrefslogtreecommitdiff
path: root/snakeplan/projects/views/stories.py
blob: 93d926fa4091ae647576e639a43b9069eec618f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from django.views.generic import list_detail
from projects.models import Story
from projects.models import Task


def index(request, story_id):
    tasks = Task.objects.filter(story=story_id).all()

    return list_detail.object_detail(
        request=request,
        queryset=Story.objects.filter(id=story_id).all(),
        object_id=story_id,
        extra_context={'tasks': tasks},
        )