mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-06-30 02:13:29 +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.
|
# Every new serializer is created with a clone of the field instances.
|
||||||
# This allows users to dynamically modify the fields on a serializer
|
# 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)
|
return copy.deepcopy(self._declared_fields)
|
||||||
|
|
||||||
def get_validators(self):
|
def get_validators(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user