From: Bryan Date: Sun, 12 Jan 2014 06:23:33 +0000 (+0000) Subject: updating for TemplateView changes in 1.5 X-Git-Tag: release-20150131~276 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3686a4064ca8f37281f1b8c45193dff7553ce4cc;p=oweals%2Fkarmaworld.git updating for TemplateView changes in 1.5 --- diff --git a/karmaworld/apps/courses/views.py b/karmaworld/apps/courses/views.py index 23d62bf..f23a689 100644 --- a/karmaworld/apps/courses/views.py +++ b/karmaworld/apps/courses/views.py @@ -81,9 +81,9 @@ 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] } - return context + if 'schools' not in kwargs: + kwargs['schools'] = School.objects.filter(file_count__gt=0).order_by('-file_count')[:20] + return kwargs def school_list(request):