diff options
author | Dusty Phillips <buchuki@gmail.com> | 2008-10-11 19:50:08 -0400 |
---|---|---|
committer | Dusty Phillips <buchuki@gmail.com> | 2008-10-11 19:50:08 -0400 |
commit | 7dedeeafd5b2e34f05bd75e548ca56942919c668 (patch) | |
tree | 57a9310a4f540772a93a7dcbc80cff0e1384d08d /devel | |
parent | f260843deb371a7d2ef5a265f52e643fcf64f86f (diff) |
simplify both look and code for dashboard
Diffstat (limited to 'devel')
-rw-r--r-- | devel/views.py | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/devel/views.py b/devel/views.py index 64d1531f..e01d475c 100644 --- a/devel/views.py +++ b/devel/views.py @@ -1,26 +1,24 @@ from django import forms from django.http import HttpResponseRedirect from django.contrib.auth.models import User +from django.shortcuts import render_to_response +from django.template import RequestContext from archweb_dev.main.models import Package, Todolist from archweb_dev.main.models import Arch, Repo from archweb_dev.main.models import UserProfile, News def index(request): '''the Developer dashboard''' - todos = Todolist.objects.get_incomplete() - pkgs = Package.objects.filter( - maintainer=request.user).filter( - needupdate=True).order_by('repo', 'pkgname') - - return render_to_response( - 'devel/index.html', - RequestContext(request, {'pkgs': pkgs, 'todos': todos, - 'maint': request.user, + page_dict = { + 'todos': Todolist.objects.incomplete(), 'repos': Repo.objects.all(), 'arches': Arch.objects.all(), - 'maintainers': - [User(id=0, username="orphan", first_name="Orphans")] + list( - User.objects.all()) - })) + 'maintainers': [ + User(id=0, username="orphan", first_name="Orphans") + ] + list(User.objects.all()) + } + + return render_to_response('devel/index.html', + RequestContext(request, page_dict)) def change_notify(request): maint = User.objects.get(username=request.user.username) |