Well there is ModelSerializerone that can automatically provide serializer fields based on your model fields (given the duality you described). A ModelSerializerallows you to choose which model fields will be displayed as fields in the serializer, which allows you to show / hide some fields.
A field in a model is traditionally tied to a data warehouse (for example, a column in a database).
DRF Serializercan exist without the Django model, since it serves as a link between the API and the client, and its fields can be in many forms that are independent of the model and support database, for example. ReadOnlyField, SerializerMethodFieldetc.
source
share