mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 20:40:14 +03:00
update get_serializer_class issue #4077
This commit is contained in:
parent
88c80fe2e9
commit
534f79a21e
|
@ -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`.
|
||||
|
|
Loading…
Reference in New Issue
Block a user