From ce77242008d6092a6c327ae122bba5fffb015db2 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Thu, 31 Mar 2022 20:33:37 -0500 Subject: [PATCH] Fix bugs --- judge/admin/comments.py | 1 + judge/views/blog.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/judge/admin/comments.py b/judge/admin/comments.py index be6780c..f71de4b 100644 --- a/judge/admin/comments.py +++ b/judge/admin/comments.py @@ -25,6 +25,7 @@ class CommentAdmin(VersionAdmin): ) list_display = ['author', 'linked_page', 'time'] search_fields = ['author__user__username', 'page', 'body'] + readonly_fields = ['score'] actions = ['hide_comment', 'unhide_comment'] list_filter = ['hidden'] actions_on_top = True diff --git a/judge/views/blog.py b/judge/views/blog.py index f29fdac..48595b9 100644 --- a/judge/views/blog.py +++ b/judge/views/blog.py @@ -68,7 +68,7 @@ class FeedView(ListView): context['top_rated'] = Profile.objects.filter(is_unlisted=False).order_by('-rating')[:10] context['top_scorer'] = Profile.objects.filter(is_unlisted=False).order_by('-performance_points')[:10] - print(context['top_rated']) + return context