Fix bugs
This commit is contained in:
parent
329a5293dd
commit
ce77242008
2 changed files with 2 additions and 1 deletions
|
@ -25,6 +25,7 @@ class CommentAdmin(VersionAdmin):
|
||||||
)
|
)
|
||||||
list_display = ['author', 'linked_page', 'time']
|
list_display = ['author', 'linked_page', 'time']
|
||||||
search_fields = ['author__user__username', 'page', 'body']
|
search_fields = ['author__user__username', 'page', 'body']
|
||||||
|
readonly_fields = ['score']
|
||||||
actions = ['hide_comment', 'unhide_comment']
|
actions = ['hide_comment', 'unhide_comment']
|
||||||
list_filter = ['hidden']
|
list_filter = ['hidden']
|
||||||
actions_on_top = True
|
actions_on_top = True
|
||||||
|
|
|
@ -68,7 +68,7 @@ class FeedView(ListView):
|
||||||
|
|
||||||
context['top_rated'] = Profile.objects.filter(is_unlisted=False).order_by('-rating')[:10]
|
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]
|
context['top_scorer'] = Profile.objects.filter(is_unlisted=False).order_by('-performance_points')[:10]
|
||||||
print(context['top_rated'])
|
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue