class RetrieveModelMixin

from rest_framework.mixins import RetrieveModelMixin
Documentation Source code
    Retrieve a model instance.
    

Ancestors (MRO)

  1. RetrieveModelMixin

Methods used but not implemented in this class

  • get_object
  • get_serializer
Expand Collapse

Methods

def retrieve(self, request, *args, **kwargs): ΒΆ RetrieveModelMixin

    def retrieve(self, request, *args, **kwargs):
        instance = self.get_object()
        serializer = self.get_serializer(instance)
        return Response(serializer.data)