          Creates a default instance of a basic non-relational field.
          """
          kwargs = {}
  
          if model_field.null or model_field.blank:
              kwargs['required'] = False
  
          if isinstance(model_field, models.AutoField) or not model_field.editable:
              kwargs['read_only'] = True
  
 
</s> remove             kwargs['required'] = not(model_field.null or model_field.blank)
 </s> add             kwargs['required'] = not(model_field.null or model_field.blank) and model_field.editable </s> remove             kwargs['required'] = not(model_field.null or model_field.blank)
 </s> add             kwargs['required'] = not(model_field.null or model_field.blank) and model_field.editable
        if model_field.null or model_field.blank and model_field.editable:
          Creates a default instance of a basic non-relational field.
          """
          kwargs = {}
  
        if model_field.null or model_field.blank and model_field.editable:
              kwargs['required'] = False
  
          if isinstance(model_field, models.AutoField) or not model_field.editable:
              kwargs['read_only'] = True
  
keep keep keep keep replace keep keep keep keep keep
 Frameworks throws AssertionError saying you cannot set required=True and read_only=True on editable=False model fields.  We should not make the field required if editable=False. 
rest_framework/serializers.py