diff options
author | Chris Miller <christopher@ctmiller.net> | 2010-02-19 23:20:32 -0500 |
---|---|---|
committer | Chris Miller <christopher@ctmiller.net> | 2010-02-19 23:20:32 -0500 |
commit | 7222e3475613761e845ac00bd4f8bcbcfda8c0a3 (patch) | |
tree | 384e1816ed8d279ffc8d12085abb20204598b130 | |
parent | 6b30ecc67a772118c6941110c19771bbb4a688c8 (diff) | |
download | snakeplan-7222e3475613761e845ac00bd4f8bcbcfda8c0a3.tar.bz2 snakeplan-7222e3475613761e845ac00bd4f8bcbcfda8c0a3.tar.xz snakeplan-7222e3475613761e845ac00bd4f8bcbcfda8c0a3.zip |
Basic page for listing iterations working more or less. Bring the pretty.
-rw-r--r-- | snakeplan/projects/urls.py | 2 | ||||
-rw-r--r-- | snakeplan/projects/views/iterations.py | 13 | ||||
-rwxr-xr-x | snakeplan/urls.py | 6 |
3 files changed, 14 insertions, 7 deletions
diff --git a/snakeplan/projects/urls.py b/snakeplan/projects/urls.py index 2386d33..cf1f67d 100644 --- a/snakeplan/projects/urls.py +++ b/snakeplan/projects/urls.py | |||
@@ -2,5 +2,5 @@ from django.conf.urls.defaults import * | |||
2 | from projects.views.iterations import * | 2 | from projects.views.iterations import * |
3 | 3 | ||
4 | urlpatterns = patterns('', | 4 | urlpatterns = patterns('', |
5 | ('^$', iteration_list), | 5 | ('^(.*?)/iterations/', iteration_list), |
6 | ) | 6 | ) |
diff --git a/snakeplan/projects/views/iterations.py b/snakeplan/projects/views/iterations.py index 189362a..327de82 100644 --- a/snakeplan/projects/views/iterations.py +++ b/snakeplan/projects/views/iterations.py | |||
@@ -1,4 +1,11 @@ | |||
1 | from django.http import HttpResponse | 1 | from django.shortcuts import render_to_response |
2 | from projects.models import Project, Iteration | ||
2 | 3 | ||
3 | def iteration_list(request): | 4 | def iteration_list(request, project_id): |
4 | return HttpResponse("Hello world") | 5 | project = Project.objects.filter(id = project_id) |
6 | iteration_list = Iteration.objects.filter(project = project_id) | ||
7 | |||
8 | return render_to_response("iteration_list.html", | ||
9 | {"project_name" : project[0].name, | ||
10 | "iteration_list" : iteration_list | ||
11 | }) | ||
diff --git a/snakeplan/urls.py b/snakeplan/urls.py index c57dadd..d02a714 100755 --- a/snakeplan/urls.py +++ b/snakeplan/urls.py | |||
@@ -5,10 +5,10 @@ from snakeplan.projects import admin as snakeplan_admin | |||
5 | admin.autodiscover() | 5 | admin.autodiscover() |
6 | 6 | ||
7 | urlpatterns = patterns('', | 7 | urlpatterns = patterns('', |
8 | (r'^snakeplan/iterations/', include('snakeplan.projects.urls')), | 8 | (r'^snakeplan/projects/', include('snakeplan.projects.urls')), |
9 | (r'^admin/', include(admin.site.urls)), | 9 | (r'^admin/', include(admin.site.urls)), |
10 | (r'^foo$', 'snakeplan.projects.views.foo'), | 10 | #(r'^foo$', 'snakeplan.projects.views.foo'), |
11 | (r'^projects$', 'snakeplan.projects.views.foo'), | 11 | #(r'^projects$', 'snakeplan.projects.views.foo'), |
12 | ) | 12 | ) |
13 | 13 | ||
14 | 14 | ||