Fixing about page to display all schools that have at least one file for #218
authorBryan Bonvallet <btbonval@gmail.com>
Fri, 20 Dec 2013 19:08:44 +0000 (14:08 -0500)
committerBryan Bonvallet <btbonval@gmail.com>
Fri, 20 Dec 2013 19:08:44 +0000 (14:08 -0500)
karmaworld/apps/courses/views.py

index 48cfa2be156dc4f548f624fcb970dd533a0a1ce6..8f8d84e3dc9d42f2b19339989055d5a3fa14ff91 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.all()[:3] }
+                    'schools': School.objects.filter(file_count__gt=0).order_by('name') }
         return context