Serializer._declared_fields enable modifying fields on a serializer

instance without affecting every other serializer instance.
This commit is contained in:
Akshar Raaj 2017-11-27 13:38:18 +05:30
parent c782376555
commit 224d8cfb9d

View File

@ -384,7 +384,7 @@ class Serializer(BaseSerializer):
"""
# Every new serializer is created with a clone of the field instances.
# This allows users to dynamically modify the fields on a serializer
# instance without affecting every other serializer class.
# instance without affecting every other serializer instance.
return copy.deepcopy(self._declared_fields)
def get_validators(self):