mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-09 23:04:47 +03:00
Merge 590b8f7848
into eafc9a2393
This commit is contained in:
commit
00fd076b1d
|
@ -14,6 +14,7 @@ from __future__ import unicode_literals
|
||||||
|
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
|
import six
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.db.models import DurationField as ModelDurationField
|
from django.db.models import DurationField as ModelDurationField
|
||||||
from django.db.models.fields import Field as DjangoModelField
|
from django.db.models.fields import Field as DjangoModelField
|
||||||
|
@ -358,7 +359,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 class.
|
||||||
return copy.deepcopy(self._declared_fields)
|
return OrderedDict((k, copy.copy(v)) for k, v in six.iteritems(self._declared_fields))
|
||||||
|
|
||||||
def get_validators(self):
|
def get_validators(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user