How to use orm while using DRF?

Hi dear folks, (cheers to all ) this is my first message so pls forgive me for the possible mistakes.
I am creating an application which will use DRF to send and get data connected to a database…
Kindly my questions are:

  1. Should I use orm while doing POST requests, I mean after getting the data from the user should I modelize the data first and do the query with orm way or should I just go with the raw sql query ?
  2. I believe the same answer applies for GET method also, right?
  3. What about if it was an already existing external database (which was not modelled already). In that case shouldn’t we be sure that all data we are interacting is being modeled by our application? If so - how? :slight_smile:

Thank you very much in advance/ (cheers again)

What is your current experience level with Django and DRF?

Have you built other projects using these tools, or is this your first?

Have a look at seriailzers which DRF Provides by default. You have to create the schema, or model the data field in models.py, then you have to create the serializers and views, and their job will be to communicate with you database.

Hi, I used those to create some projects but mostly not in very high level. Thanks

Hi, thank you Suraj I think I know the mechanism , just not sure when/if to serialize all data in the database (especially when db is under my control and when it is totally external)