Default sort is ascending, want descending sort here.
authorBryan Bonvallet <btbonval@gmail.com>
Fri, 20 Dec 2013 21:25:25 +0000 (16:25 -0500)
committerBryan Bonvallet <btbonval@gmail.com>
Fri, 20 Dec 2013 21:25:25 +0000 (16:25 -0500)
karmaworld/apps/courses/views.py

index 1bd64ee0a1442dadb27565f47c443536485e6311..6b7cfc6ee46d19b702e5f875533eddff1ac66d44 100644 (file)
@@ -83,7 +83,7 @@ class AboutView(TemplateView):
     def get_context_data(self, **kwargs):
         """ get the list of schools with the most files for leaderboard """
         context = { 'params': kwargs,
-                    'schools': School.objects.filter(file_count__gt=0).order_by('file_count')[:20] }
+                    'schools': School.objects.filter(file_count__gt=0).order_by('-file_count')[:20] }
         return context