caktus/django-timepiece — Issue #136: Simplify HourGroup query
Author: copelco
Created: 2012-02-01 02:14:26+00:00
State: open

Entry.objects.filter(status='approved', end_time__lt=date, project__id=97).values('activity__activity_bundle').annotate(Sum('hours')).order_by('activity__activity_bundle__order', 'activity__activity_bundle__name')