Permalink
Browse files

Secondary sort on index/project views of build datetime

  • Loading branch information...
1 parent 3387a73 commit 02e4880ff4f6626f903aa743394b8a6d8a853864 @dcramer dcramer committed Nov 1, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/zumanji/views.py
@@ -27,7 +27,7 @@ def wrapped(request, *args, **kwargs):
def index(request):
- build_qs = Build.objects.order_by('-revision__datetime').select_related('revision')
+ build_qs = Build.objects.order_by('-revision__datetime', '-datetime').select_related('revision')
project_list = []
# lol O(N)
for project in Project.objects.all():
@@ -47,7 +47,7 @@ def view_project(request, project_label):
build_list = list(Build.objects
.filter(project=project)
- .order_by('-revision__datetime')
+ .order_by('-revision__datetime', '-datetime')
.select_related('revision', 'project'))
return render(request, 'zumanji/project.html', {

0 comments on commit 02e4880

Please sign in to comment.