Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Secondary sort on index/project views of build datetime

  • Loading branch information...
commit 02e4880ff4f6626f903aa743394b8a6d8a853864 1 parent 3387a73
David Cramer authored October 31, 2012

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  src/zumanji/views.py
4  src/zumanji/views.py
@@ -27,7 +27,7 @@ def wrapped(request, *args, **kwargs):
27 27
 
28 28
 
29 29
 def index(request):
30  
-    build_qs = Build.objects.order_by('-revision__datetime').select_related('revision')
  30
+    build_qs = Build.objects.order_by('-revision__datetime', '-datetime').select_related('revision')
31 31
     project_list = []
32 32
     # lol O(N)
33 33
     for project in Project.objects.all():
@@ -47,7 +47,7 @@ def view_project(request, project_label):
47 47
 
48 48
     build_list = list(Build.objects
49 49
         .filter(project=project)
50  
-        .order_by('-revision__datetime')
  50
+        .order_by('-revision__datetime', '-datetime')
51 51
         .select_related('revision', 'project'))
52 52
 
53 53
     return render(request, 'zumanji/project.html', {

0 notes on commit 02e4880

Please sign in to comment.
Something went wrong with that request. Please try again.