5👍
✅
You can make the field not required by specifying that in the ModelSerializer
:
class MyModelSerializer(ModelSerializer):
created_time = serializer.DateTimeField(required=False)
class Meta:
model = MyModel
fields = ['name', 'created_time']
Source:stackexchange.com