  from django.db import models
  from django.db.models.fields import FieldDoesNotExist, Field as DjangoModelField
  from django.db.models import query
  from django.utils.translation import ugettext_lazy as _
  from rest_framework.compat import postgres_fields, unicode_to_repr
  from rest_framework.utils import model_meta
  from rest_framework.utils.field_mapping import (
      get_url_kwargs, get_field_kwargs,
      get_relation_kwargs, get_nested_relation_kwargs,
 
</s> remove         fields = [field for field in self.fields.values() if not field.write_only]
 </s> add         fields = self._to_representation_fields </s> remove         fields = [
            field for field in self.fields.values()
            if (not field.read_only) or (field.default is not empty)
        ]
 </s> add         fields = self._to_internal_value_fields
from django.utils.functional import cached_property
  from django.db import models
  from django.db.models.fields import FieldDoesNotExist, Field as DjangoModelField
  from django.db.models import query
from django.utils.functional import cached_property
  from django.utils.translation import ugettext_lazy as _
  from rest_framework.compat import postgres_fields, unicode_to_repr
  from rest_framework.utils import model_meta
  from rest_framework.utils.field_mapping import (
      get_url_kwargs, get_field_kwargs,
      get_relation_kwargs, get_nested_relation_kwargs,
keep keep add keep keep keep keep keep keep
 Cache fields list for to_internal_value and to_representation. 
rest_framework/serializers.py