  
          if 'choices' in field_kwargs:
              # Fields with choices get coerced into `ChoiceField`
              # instead of using their regular typed field.
              field_class = ChoiceField
  
          if not issubclass(field_class, ModelField):
              # `model_field` is only valid for the fallback case of
              # `ModelField`, which is used when no other typed field
              # matched to the model field.
 
</s> remove     serializer_related_class = HyperlinkedRelatedField
 </s> add     serializer_related_field = HyperlinkedRelatedField </s> remove         field_class = self.serializer_related_class
 </s> add         field_class = self.serializer_related_field </s> remove     serializer_related_class = PrimaryKeyRelatedField
 </s> add     serializer_related_field = PrimaryKeyRelatedField
    serializer_url_field = HyperlinkedIdentityField
    serializer_choice_field = ChoiceField </s> remove         field_class = HyperlinkedIdentityField
 </s> add         field_class = self.serializer_url_field
            field_class = self.serializer_choice_field
  
          if 'choices' in field_kwargs:
              # Fields with choices get coerced into `ChoiceField`
              # instead of using their regular typed field.
            field_class = self.serializer_choice_field
  
          if not issubclass(field_class, ModelField):
              # `model_field` is only valid for the fallback case of
              # `ModelField`, which is used when no other typed field
              # matched to the model field.
keep keep keep keep replace keep keep keep keep keep
 Minor cleanups/improvements to ModelSerializer API 
rest_framework/serializers.py