From dad6544cdd4b61f572e426ea8d83af5980cb0a55 Mon Sep 17 00:00:00 2001 From: ybkang1108 Date: Mon, 5 Aug 2024 02:12:29 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=B9=9C=EA=B5=AC=20=EC=9A=94=EC=B2=AD?= =?UTF-8?q?/=EC=88=98=EB=9D=BD/=EA=B1=B0=EC=A0=88=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- friends/serializers.py | 6 ++++++ friends/views.py | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/friends/serializers.py b/friends/serializers.py index bb4caa9..e0d6254 100644 --- a/friends/serializers.py +++ b/friends/serializers.py @@ -254,6 +254,12 @@ def get_rating_average(self, obj): return obj.rating_average() +class FriendRequestSerializer(serializers.ModelSerializer): + class Meta: + model = Friend + fields = "__all__" + + class RestaurantSerializer(serializers.ModelSerializer): # reviews = serializers.SerializerMethodField() diff --git a/friends/views.py b/friends/views.py index ff749bc..6117877 100644 --- a/friends/views.py +++ b/friends/views.py @@ -2,6 +2,10 @@ from rest_framework.decorators import api_view from rest_framework.views import APIView +# from rest_framework.authentication import TokenAuthentication +# from rest_framework.permissions import IsAuthenticated +from rest_framework.views import APIView + # from rest_framework.authentication import TokenAuthentication # from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response @@ -14,7 +18,7 @@ FriendRequestSerializer, RestaurantlistSerializer, FriendRecommendSerializer, - RestaurantSerializer, + # RestaurantSerializer, ) # from .serializers import FriendSerializer, FriendRequestSerializer