summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-07-05 22:22:19 -0500
committerDan McGee <dan@archlinux.org>2010-07-05 22:22:19 -0500
commit85807311ca5545ea5e9d5a0170cf816269982348 (patch)
tree3d7c6a3859fc2961fef13a5ce3daeb1597fc7e01 /devel
parentcb9c74eff8f7c3469cc5e84477074c138ed555df (diff)
Show incomplete todo list packages in dev dashboard
Implements FS#20081. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel')
-rw-r--r--devel/views.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/devel/views.py b/devel/views.py
index 4215c0d8..c600f089 100644
--- a/devel/views.py
+++ b/devel/views.py
@@ -9,7 +9,7 @@ from django.core.mail import send_mail
from django.db.models import Q
from django.views.decorators.cache import never_cache
-from main.models import Package, Todolist
+from main.models import Package, Todolist, TodolistPkg
from main.models import Arch, Repo
from main.models import UserProfile, News
from main.models import Mirror
@@ -25,14 +25,19 @@ pwletters = ascii_letters + digits
def index(request):
'''the Developer dashboard'''
inner_q = PackageRelation.objects.filter(user=request.user).values('pkgbase')
- packages = Package.objects.select_related('arch', 'repo').filter(needupdate=True)
- packages = packages.filter(pkgbase__in=inner_q)
+ flagged = Package.objects.select_related('arch', 'repo').filter(needupdate=True)
+ flagged = flagged.filter(pkgbase__in=inner_q)
+
+ todopkgs = TodolistPkg.objects.select_related(
+ 'pkg', 'pkg__arch', 'pkg__repo').filter(complete=False)
+ todopkgs = todopkgs.filter(pkg__pkgbase__in=inner_q)
page_dict = {
'todos': Todolist.objects.incomplete(),
'repos': Repo.objects.all(), 'arches': Arch.objects.all(),
'maintainers': User.objects.filter(is_active=True).order_by('last_name'),
- 'flagged' : packages,
+ 'flagged' : flagged,
+ 'todopkgs' : todopkgs,
}
return render_to_response('devel/index.html',