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