summaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-12-28 07:27:20 +0100
committerDan McGee <dan@archlinux.org>2012-12-28 21:48:29 +0100
commitc8ece67cec9c421ac0c711554edd34f022623b45 (patch)
treea894e1e82df91fda22807efbc3519bd18e12f321 /devel
parentc7658ca4cd0f89969086fed172519ca2097270ba (diff)
downloadarchweb-c8ece67cec9c421ac0c711554edd34f022623b45.tar.gz
archweb-c8ece67cec9c421ac0c711554edd34f022623b45.tar.xz
Convert to using new todolist models everywhere
This is a rather widespread set of changes converting usage to the new todo list and todo list package model recently introduced. The data migration is not included in this commit. After this commit, the old model should no longer be referenced anywhere. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel')
-rw-r--r--devel/views.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/devel/views.py b/devel/views.py
index 7d5947d..e01590a 100644
--- a/devel/views.py
+++ b/devel/views.py
@@ -20,11 +20,12 @@ from django.utils.http import http_date
from django.utils.timezone import now
from .forms import ProfileForm, UserProfileForm, NewUserForm
-from main.models import Package, PackageFile, TodolistPkg
+from main.models import Package, PackageFile
from main.models import Arch, Repo
from news.models import News
from packages.models import PackageRelation, Signoff, FlagRequest, Depend
from packages.utils import get_signoff_groups
+from todolists.models import TodolistPackage
from todolists.utils import get_annotated_todolists
from .utils import get_annotated_maintainers, UserFinder
@@ -41,10 +42,11 @@ def index(request):
flagged = Package.objects.normal().filter(
flag_date__isnull=False, pkgbase__in=inner_q).order_by('pkgname')
- todopkgs = TodolistPkg.objects.select_related(
- 'pkg', 'pkg__arch', 'pkg__repo').filter(complete=False)
- todopkgs = todopkgs.filter(pkg__pkgbase__in=inner_q).order_by(
- 'list__name', 'pkg__pkgname')
+ todopkgs = TodolistPackage.objects.select_related(
+ 'todolist', 'pkg', 'arch', 'repo').exclude(
+ status=TodolistPackage.COMPLETE)
+ todopkgs = todopkgs.filter(pkgbase__in=inner_q).order_by(
+ 'todolist__name', 'pkgname')
todolists = get_annotated_todolists(incomplete_only=True)