1

halo guys i wan to retrieve a particular object using DRF RETRIEVEAPIVIEW using UUID as my pk but i'm getting

{
    "detail": "Not found."
}

error below is my APIVIEW and url

class RetrieveProfile(generics.RetrieveAPIView):
    lookup_field = 'id'
    serializer_class = UserProfileSerializer
    permission_classes = [IsAuthenticatedOrReadOnly]
    queryset = UserProfile.objects.all()
    path('<uuid:id>/display',RetrieveProfile.as_view(), name="display-profile"),

any help on how to solve this ?

Tosin Ayoola
  • 77
  • 1
  • 9

0 Answers0