Skip to content
Snippets Groups Projects
Commit a0be3273 authored by Kangmin Lee's avatar Kangmin Lee
Browse files

게시글 정렬 수정

parent 1a61a913
No related branches found
No related tags found
No related merge requests found
......@@ -20,10 +20,10 @@ class Main(APIView):
order_condition = request.GET.get('order', None)
if order_condition == 'recent':
feed_object_list.order_by('-id')
feed_object_list=Feed.objects.filter(univ=user.univ).order_by('-id')
if order_condition == 'likesCount':
feed_object_list.order_by('-like_count')
feed_object_list=Feed.objects.filter(univ=user.univ).order_by('-like_count')
print(order_condition)
print(feed_object_list)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment