diff options
author | Dusty Phillips <buchuki@gmail.com> | 2008-07-02 01:12:47 +0200 |
---|---|---|
committer | Dusty Phillips <buchuki@gmail.com> | 2008-07-02 01:12:47 +0200 |
commit | eb6feb5e6d2959c61fd0af881c05fb643d123514 (patch) | |
tree | 45f4dda62775faf54c81fb065e125892651e6b11 | |
parent | d91e5e0268edb043a4ef9c5ed627f870b91253cc (diff) | |
download | archweb-eb6feb5e6d2959c61fd0af881c05fb643d123514.tar.gz archweb-eb6feb5e6d2959c61fd0af881c05fb643d123514.tar.xz |
stupid stupid variable overwrite
-rw-r--r-- | todolists/views.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/todolists/views.py b/todolists/views.py index f357645..7095b14 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, |