mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-10 19:56:59 +03:00
Serializer._declared_fields enable modifying fields on a serializer
instance without affecting every other serializer instance.
This commit is contained in:
parent
c782376555
commit
224d8cfb9d
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue
Block a user