update get_serializer_class issue #4077

This commit is contained in:
Rex Salisbury 2016-04-27 15:40:08 -07:00
parent 88c80fe2e9
commit 534f79a21e

View File

@ -106,11 +106,11 @@ class GenericAPIView(views.APIView):
Return the serializer instance that should be used for validating and
deserializing input, and for serializing output.
"""
serializer_class = self.get_serializer_class()
serializer_class = self.get_serializer_class(*args, **kwargs)
kwargs['context'] = self.get_serializer_context()
return serializer_class(*args, **kwargs)
def get_serializer_class(self):
def get_serializer_class(self, *args, **kwargs):
"""
Return the class to use for the serializer.
Defaults to using `self.serializer_class`.