<filename>src/account/api/views.py
from rest_framework import generics as g

from account.api.serializers import ContactSerializer
from account.models import Contact


class ContactsView(g.ListCreateAPIView):
    queryset = Contact.objects.all()
    serializer_class = ContactSerializer

    def get_queryset(self):
        queryset = super().get_queryset()
        return queryset.filter(id=self.request.user.id)


class ContactView(g.RetrieveUpdateAPIView):
    queryset = Contact.objects.all()
    serializer_class = ContactSerializer

<filename>src/account/api/views.py
from rest_framework import generics as g

from account.api.serializers import ContactSerializer
from account.models import Contact


class ContactsView(g.ListCreateAPIView):
    queryset = Contact.objects.all()
    serializer_class = ContactSerializer

    def get_queryset(self):
        queryset = super().get_queryset()
        return queryset.filter(id=self.request.user.id)


class ContactView(g.RetrieveUpdateAPIView):
    queryset = Contact.objects.all()
    serializer_class = ContactSerializer
