diff options
author | Dan McGee <dan@archlinux.org> | 2012-08-08 19:34:37 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-08-08 19:34:37 -0500 |
commit | 978a5c61a5412eeed054307d3e2979324ffcb64a (patch) | |
tree | 034e2e9a158a4c27741a79ff6028d4cd9c8575e4 | |
parent | 064a1b7699ef8f65ee1c123f93cd8da02e843dea (diff) |
Add flag requests to developer last action calculation
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | devel/views.py | 8 | ||||
-rw-r--r-- | templates/devel/clock.html | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/devel/views.py b/devel/views.py index f877bc84..ad1f4deb 100644 --- a/devel/views.py +++ b/devel/views.py @@ -29,7 +29,7 @@ from .models import UserProfile from main.models import Package, PackageFile, TodolistPkg from main.models import Arch, Repo from news.models import News -from packages.models import PackageRelation, Signoff, Depend +from packages.models import PackageRelation, Signoff, FlagRequest, Depend from packages.utils import get_signoff_groups from todolists.utils import get_annotated_todolists from .utils import get_annotated_maintainers, UserFinder @@ -103,6 +103,11 @@ def clock(request): latest_signoff = dict(Signoff.objects.filter( user__is_active=True).values_list('user').order_by( ).annotate(last_signoff=Max('created'))) + # The extra() bit ensures we can use our 'user_id IS NOT NULL' index + latest_flagreq = dict(FlagRequest.objects.filter( + user__is_active=True).extra( + where=['user_id IS NOT NULL']).values_list('user_id').order_by( + ).annotate(last_flagrequest=Max('created'))) latest_log = dict(LogEntry.objects.filter( user__is_active=True).values_list('user').order_by( ).annotate(last_log=Max('action_time'))) @@ -112,6 +117,7 @@ def clock(request): latest_news.get(dev.id, None), latest_package.get(dev.id, None), latest_signoff.get(dev.id, None), + latest_flagreq.get(dev.id, None), latest_log.get(dev.id, None), dev.last_login, ] diff --git a/templates/devel/clock.html b/templates/devel/clock.html index bf4614b5..02e42749 100644 --- a/templates/devel/clock.html +++ b/templates/devel/clock.html @@ -20,6 +20,7 @@ mirror)</li> <li>Post date of a news item</li> <li>Signing off on a package</li> + <li>Flagging a package out-of-date</li> </ul> <p> Current UTC Time: {{ utc_now|date:"Y-m-d H:i T" }} |