      def get_pk_field(self, model_field):
          """
          Returns a default instance of the pk field.
          """
          return Field()
  
      def get_nested_field(self, model_field):
          """
          Creates a default instance of a nested relational field.
          """
 
</s> remove         if not model_field.editable:
 </s> add         if isinstance(model_field, models.AutoField) or not model_field.editable:
        return self.get_field(model_field)
      def get_pk_field(self, model_field):
          """
          Returns a default instance of the pk field.
          """
        return self.get_field(model_field)
  
      def get_nested_field(self, model_field):
          """
          Creates a default instance of a nested relational field.
          """
keep keep keep keep replace keep keep keep keep keep
 PK fields should only be read-only if they are an AutoField.  Fixes #563 
rest_framework/serializers.py