summaryrefslogtreecommitdiffstats
path: root/todolists
diff options
context:
space:
mode:
authorDusty Phillips <buchuki@gmail.com>2008-07-01 19:12:47 -0400
committerDusty Phillips <buchuki@gmail.com>2008-07-01 19:12:47 -0400
commiteb6feb5e6d2959c61fd0af881c05fb643d123514 (patch)
tree45f4dda62775faf54c81fb065e125892651e6b11 /todolists
parentd91e5e0268edb043a4ef9c5ed627f870b91253cc (diff)
downloadarchweb-eb6feb5e6d2959c61fd0af881c05fb643d123514.tar.gz
archweb-eb6feb5e6d2959c61fd0af881c05fb643d123514.zip
stupid stupid variable overwrite
Diffstat (limited to 'todolists')
-rw-r--r--todolists/views.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/todolists/views.py b/todolists/views.py
index f3576450..7095b141 100644
--- a/todolists/views.py
+++ b/todolists/views.py
@@ -63,9 +63,11 @@ def add(request):
creator = request.user,
name = form.clean_data['name'],
description = form.clean_data['description'])
+
for pkg in form.clean_data['packages']:
- todo = TodolistPkg.objects.create(list = todo, pkg = pkg)
- send_todolist_email(todo)
+ tpkg = TodolistPkg.objects.create(list = todo, pkg = pkg)
+ send_todolist_email(tpkg)
+
return HttpResponseRedirect('/todo/')
else:
form = TodoListForm()
@@ -97,9 +99,9 @@ def edit(request, list_id):
# now add any packages not in the old list
for pkg in form.clean_data['packages']:
if pkg not in packages:
- todo = TodolistPkg.objects.create(
+ tpkg = TodolistPkg.objects.create(
list = todo_list, pkg = pkg)
- send_todolist_email(todo)
+ send_todolist_email(tpkg)
return HttpResponseRedirect('/todo/%d/' % todo_list.id)
else:
@@ -121,6 +123,9 @@ def send_todolist_email(todo):
package has been added to a to-do list'''
if todo.pkg.maintainer_id == 0:
return
+ print todo
+ print todo.list_id
+ print todo.list.name
page_dict = {
'pkg': todo.pkg,
'todolist': todo.list,