diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-04-23 21:57:59 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-04-23 21:57:59 -0400 |
commit | 55b776d58999412cd6bf0787a41d6ab00bf80fb6 (patch) | |
tree | e6c151ee22207465346b230f92a42d75576409d1 /devel | |
parent | 4578eb77da75c24f9b366c2ade46f55b0702b340 (diff) | |
parent | ac1c00ee86cc0e355af5e4e6be47ca861091356b (diff) |
Merge branch 'archweb' into archweb-generic2
Diffstat (limited to 'devel')
-rw-r--r-- | devel/urls.py | 1 | ||||
-rw-r--r-- | devel/views.py | 21 |
2 files changed, 16 insertions, 6 deletions
diff --git a/devel/urls.py b/devel/urls.py index 31afc86b..472c6456 100644 --- a/devel/urls.py +++ b/devel/urls.py @@ -5,6 +5,7 @@ urlpatterns = patterns('devel.views', (r'^admin_log/(?P<username>.*)/$','admin_log'), (r'^clock/$', 'clock', {}, 'devel-clocks'), (r'^$', 'index', {}, 'devel-index'), + (r'^stats/$', 'stats', {}, 'devel-stats'), (r'^newuser/$', 'new_user_form'), (r'^profile/$', 'change_profile'), (r'^reports/(?P<report_name>.*)/(?P<username>.*)/$', 'report'), diff --git a/devel/views.py b/devel/views.py index 4258ea7f..378d6d57 100644 --- a/devel/views.py +++ b/devel/views.py @@ -33,7 +33,7 @@ from .utils import get_annotated_maintainers @login_required def index(request): - '''the developer dashboard''' + """The developer dashboard.""" if request.user.is_authenticated(): inner_q = PackageRelation.objects.filter(user=request.user) else: @@ -54,6 +54,19 @@ def index(request): signoffs = sorted(get_signoff_groups(user=request.user), key=operator.attrgetter('pkgbase')) + page_dict = { + 'todos': todolists, + 'flagged': flagged, + 'todopkgs': todopkgs, + 'signoffs': signoffs + } + + return render(request, 'devel/index.html', page_dict) + + +@login_required +def stats(request): + """The second half of the dev dashboard.""" arches = Arch.objects.all().annotate( total_ct=Count('packages'), flagged_ct=Count('packages__flag_date')) repos = Repo.objects.all().annotate( @@ -80,17 +93,13 @@ def index(request): } page_dict = { - 'todos': todolists, 'arches': arches, 'repos': repos, 'maintainers': maintainers, 'orphan': orphan, - 'flagged': flagged, - 'todopkgs': todopkgs, - 'signoffs': signoffs } - return render(request, 'devel/index.html', page_dict) + return render(request, 'devel/stats.html', page_dict) @login_required |