1 from rest_framework.generics import RetrieveAPIView
2 from rest_framework.permissions import IsAuthenticated
3 from . import serializers
6 class MeView(RetrieveAPIView):
7 permission_classes = [IsAuthenticated]
8 serializer_class = serializers.UserSerializer
11 return self.request.user