  
  
  class TimestampedModelSerializer(serializers.ModelSerializer):
      class Meta:
          model = TimestampedModel
  
  
 
</s> remove         if not model_field.editable:
 </s> add         if isinstance(model_field, models.AutoField) or not model_field.editable: </s> remove         return Field()
 </s> add         return self.get_field(model_field)
class CharPrimaryKeyModel(models.Model):
    id = models.CharField(max_length=20, primary_key=True)


  
  
class CharPrimaryKeyModel(models.Model):
    id = models.CharField(max_length=20, primary_key=True)


  class TimestampedModelSerializer(serializers.ModelSerializer):
      class Meta:
          model = TimestampedModel
  
  
keep add keep keep keep keep keep
 PK fields should only be read-only if they are an AutoField.  Fixes #563 
rest_framework/tests/fields.py