From a0be3273f3b46bbbadcb2bacca20b5ec22a24556 Mon Sep 17 00:00:00 2001 From: Kangmin Lee <dlrkdals421@ajou.ac.kr> Date: Mon, 6 Jun 2022 07:38:25 +0000 Subject: [PATCH] =?UTF-8?q?=EA=B2=8C=EC=8B=9C=EA=B8=80=20=EC=A0=95?= =?UTF-8?q?=EB=A0=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- campics_/jinstagram/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/campics_/jinstagram/views.py b/campics_/jinstagram/views.py index 47b295b..41bdb62 100644 --- a/campics_/jinstagram/views.py +++ b/campics_/jinstagram/views.py @@ -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) -- GitLab