[Python] how DRF undestand which field in serialazer.py is related to which model field?

Discussão em 'Python' iniciado por Stack, Julho 25, 2025.

  1. Stack

    Stack Membro Participativo

    imagine i have a super simple serializer.py file : [​IMG]


    and i just want to use it ! nothing special .. so im going to write something like this (with a model class called "Product") & its going to work : [​IMG]

    But how DRF undrstand which field in serializer.py file belongs to which field in the "Product" class in models file ? (i told DRF nothing about it !? + considering that the API Model != Data Model )

    Continue reading...

Compartilhe esta Página