diff options
Diffstat (limited to 'snakeplan/projects/views/projects.py')
-rw-r--r-- | snakeplan/projects/views/projects.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/snakeplan/projects/views/projects.py b/snakeplan/projects/views/projects.py index 288083e..78de64c 100644 --- a/snakeplan/projects/views/projects.py +++ b/snakeplan/projects/views/projects.py | |||
@@ -1,5 +1,6 @@ | |||
1 | from django.views.generic import list_detail | 1 | from django.views.generic import list_detail |
2 | from snakeplan.projects.models import Project | 2 | from snakeplan.projects.models import Project |
3 | from snakeplan.projects.models import Iteration | ||
3 | 4 | ||
4 | 5 | ||
5 | def index(request): | 6 | def index(request): |
@@ -8,3 +9,15 @@ def index(request): | |||
8 | queryset=Project.objects.all(), | 9 | queryset=Project.objects.all(), |
9 | allow_empty=True | 10 | allow_empty=True |
10 | ) | 11 | ) |
12 | |||
13 | |||
14 | def project_iterations(request, project_id): | ||
15 | iterations = Iteration.objects.filter(project=project_id) | ||
16 | project = iterations[0].project | ||
17 | |||
18 | return list_detail.object_list( | ||
19 | request=request, | ||
20 | queryset=iterations, | ||
21 | extra_context={'project_name': project}, | ||
22 | allow_empty=True | ||
23 | ) | ||