summaryrefslogtreecommitdiff
path: root/todolists/views.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-12-28 09:22:23 -0600
committerDan McGee <dan@archlinux.org>2012-12-28 14:48:29 -0600
commit2ff967c3d9433361b1f086c326f3a473f10373e3 (patch)
tree4c657663af832757559629e036718f97c323bfda /todolists/views.py
parentc8ece67cec9c421ac0c711554edd34f022623b45 (diff)
Todolist URLs map to old_id now, not id
This is a short-term fix before adding a slug field to todo lists as we did to news a while back. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'todolists/views.py')
-rw-r--r--todolists/views.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/todolists/views.py b/todolists/views.py
index 94164391..ccf65369 100644
--- a/todolists/views.py
+++ b/todolists/views.py
@@ -35,7 +35,7 @@ class TodoListForm(forms.ModelForm):
@permission_required('todolists.change_todolistpackage')
@never_cache
def flag(request, list_id, pkg_id):
- todolist = get_object_or_404(Todolist, id=list_id)
+ todolist = get_object_or_404(Todolist, old_id=list_id)
tlpkg = get_object_or_404(TodolistPackage, id=pkg_id)
# TODO: none of this; require absolute value on submit
if tlpkg.status == TodolistPackage.INCOMPLETE:
@@ -53,7 +53,7 @@ def flag(request, list_id, pkg_id):
@login_required
def view(request, list_id):
- todolist = get_object_or_404(Todolist, id=list_id)
+ todolist = get_object_or_404(Todolist, old_id=list_id)
svn_roots = Repo.objects.values_list(
'svn_root', flat=True).order_by().distinct()
# we don't hold onto the result, but the objects are the same here,
@@ -71,7 +71,7 @@ def view(request, list_id):
# really no need for login_required on this one...
def list_pkgbases(request, list_id, svn_root):
'''Used to make bulk moves of packages a lot easier.'''
- todolist = get_object_or_404(Todolist, id=list_id)
+ todolist = get_object_or_404(Todolist, old_id=list_id)
repos = get_list_or_404(Repo, svn_root=svn_root)
pkgbases = TodolistPackage.objects.values_list('pkgbase', flat=True).filter(
todolist=todolist, repo__in=repos).distinct().order_by('pkgbase')
@@ -107,7 +107,7 @@ def add(request):
@permission_required('todolists.change_todolist')
@never_cache
def edit(request, list_id):
- todo_list = get_object_or_404(Todolist, id=list_id)
+ todo_list = get_object_or_404(Todolist, old_id=list_id)
if request.POST:
form = TodoListForm(request.POST, instance=todo_list)
if form.is_valid():