thank you for the tutorial but 41:10 every time you are doing a PUT or PATCH a new instance is being created instead of replacing the old one. You can see that from the json reply postman gets, the id is incremented in every new reply. This simple change of code will fix this issue, inside the if and elif condition put these lines accordingly, refObj=peopleModel.objects.get(id=id_taken_fromURL_or_requestData) seralizer=PeopleSerializer(instance=refObj , data=request.data) Thank you alot for this great effort
its not in patch only in put,because he forgot to write the code which he has written in patch ie. obj=Person.objects.get(id=data['id']) serializer(obj,data=data)
Content is awesome. Covering the content in such a short time is very useful especially before the interviews. Thank you Abhijeet and Scaler for this video.
At 42:13 , don't you think the code written for PUT operation is similar to what it has been written for POST operation and hence will create a new entry instead of updating the existing entry. We should be serializer.update() method instead
It is a wonderful course for getting information about DRF. I have one query. When I am using MoelViewSet , GET and POST is working fine but in case of PUT, PATCH and DELETE it gives me error: Method not allowed. What is the reason behind this ?
I appreciate you a thousand times for this tutorial, you have saved me a lot of stress and given me a super head start. I am subscribed to your channel
hi, iam facing a problem that i could only see the first interface saying the install worked successfully in django , i checkedd so many time the url and everything is same in api core and when i run the server i get the sam welcome django interface. i tried different channels and all the result is same . i didnt know what is the problem and how to solve it even passing different urls it takes only the admin url others are not shown . what is the solution for this can anyone please help me.
Thanks Abhijeet I am following you from long time ..... I am a student in Scaler but bhai inkey piche mat lagna SCALAER==SCAM , They dont have any placement
Hi Yash, this is not what we stand for & we’d like to highlight this internally. We appreciate you taking the time to bring this forward & our apologies once again for the experience you’ve had to endure. Please write to us at support@scaler.com along with your relevant details or share your contact details and e-mail ID with us via Twitter/Facebook/Instagram DM, so that we can connect with you.
hello am getting { "detail": "Unsupported media type \"text/plain\" in request." } this error in post man and Unsupported Media Type: /api/people/ [25/Sep/2023 12:51:31] "POST /api/people/ HTTP/1.1" 415 62 this error on terminal do anyone know how to resolve it
thank you for the tutorial but 41:10 every time you are doing a PUT or PATCH a new instance is being created instead of replacing the old one. You can see that from the json reply postman gets, the id is incremented in every new reply. This simple change of code will fix this issue, inside the if and elif condition put these lines accordingly,
refObj=peopleModel.objects.get(id=id_taken_fromURL_or_requestData)
seralizer=PeopleSerializer(instance=refObj , data=request.data)
Thank you alot for this great effort
galat padha rahe hai ye log
its not in patch only in put,because he forgot to write the code which he has written in patch ie.
obj=Person.objects.get(id=data['id'])
serializer(obj,data=data)
as a beginner, took more than 20 hrs to finish the course
but content was concise and great, hats off to Abhijeet
these kinda tutorials are what put someone in TUTORIAL HELL
@@MihirSanjayYadav exactly, this guy didn't cover any point in detail
Content is awesome. Covering the content in such a short time is very useful especially before the interviews. Thank you Abhijeet and Scaler for this video.
Thanks! Glad this was helpful! 😃
Concise and crisp. Excellent explanation
thanks bro for revieving my career .Respect From NEPAL .
Indian educators have a long way to go. Vast quality difference from the likes of Mosh or Dennis Ivy
Mosh and others failed in terms of python or anything related to python framework they are good at front end but backend its us 🎉
The practise is good but please also just explain the what the methods do when we are using them ☺️
Great Lecture..!!❤, Can you please share the Code too (GIT)
Awesome course I've ever found............ 🥰💘
Happy to hear that! 🙌🏼
Your are doing GET and POST before migrating the model. Anyway good content
45:57 please explain the changes in put method using serializers. You directly copy pasted the same code of post request @scaler. Thank you.
At 42:13 , don't you think the code written for PUT operation is similar to what it has been written for POST operation and hence will create a new entry instead of updating the existing entry. We should be serializer.update() method instead
It is a wonderful course for getting information about DRF. I have one query. When I am using MoelViewSet , GET and POST is working fine but in case of PUT, PATCH and DELETE it gives me error: Method not allowed. What is the reason behind this ?
you were not adding those method in @api_view()
Great video sir. great effort, keep it up. One of the best DRF tutorials, Thanks!
Thanks! Glad this was helpful! 😃
Wow, great video. Was looking for this for some time, thanks!!
Happy to hear that! 🙌🏼
55:12 -- nicely he skipped explaining create in nested serializer. Not good :(
@Scaler Why this carelessness
Thanks man! 🎉😊With this course, I'm gonna b a pro in no time! 🤩
very help full for bigginerss
best tutorial i've seen yet
Is this django rest api for developer designing web application ? Not for testers ah
Excellent explanation
Good video, but the learner needs to be alert as there are some gaps which if not accounted for can lead to errors.
It was good. You left Testing, Unit tests
Django restful api and Django rest frame work both are same Ah bro ?
Really content is good. One kind request is, please upload 1080px video
Hi Gokul, we have duly made a note of your suggestion and it will be passed on to our relevant teams. Thank you! 😊
Thanks a lot from Bangladesh 🧡
This was just awesome. Kudos!
Happy to hear that! 🙌🏼
I appreciate you a thousand times for this tutorial, you have saved me a lot of stress and given me a super head start. I am subscribed to your channel
Thanks! Glad this was helpful! 😃
.create() method does not support writable nested fields by default. Can anyone tell about this
Yes, This person is out of context.. 😂. He skiped and making us fool.
@@Pramodsharma-uz8ix So is this scaler overated.
yes same error .. even at model
hi, iam facing a problem that i could only see the first interface saying the install worked successfully in django , i checkedd so many time the url and everything is same in api core and when i run the server i get the sam welcome django interface. i tried different channels and all the result is same . i didnt know what is the problem and how to solve it even passing different urls it takes only the admin url others are not shown . what is the solution for this can anyone please help me.
Can you also do advanced backend course with django please
Hi, we have duly made a note of your suggestion and it will be passed on to our relevant teams. Thank you! 😊
great explanation
Thanks a lot buddy🤝👊
Thanks Abhijeet I am following you from long time .....
I am a student in Scaler but bhai inkey piche mat lagna SCALAER==SCAM ,
They dont have any placement
Hi Yash, this is not what we stand for & we’d like to highlight this internally. We appreciate you taking the time to bring this forward & our apologies once again for the experience you’ve had to endure. Please write to us at support@scaler.com along with your relevant details or share your contact details and e-mail ID with us via Twitter/Facebook/Instagram DM, so that we can connect with you.
🤣
Thanks, Abhijeet. 👏
Awesome and very useful
Happy to hear that! 🙌🏼
Thanks
Wonderful
Where did the old code for views go at 30:59 ???
I got an error in apiview class post method. Can anyone explain this
Error: non field error
Amazing bro.
Thank you a lot!
abhijeet bro nicely escaped from nested serializer 🤣🤣🤣🤣
Source code
Thanks ❤
can i get github link of the code
No
LEGEND
Todo project?
Not Todo bro it is crud operation n DRF + types of serialisation + pagination+ token authentication and validation
7:35
i am getting the error as django.db.utils.OperationalError: no such table: home_person
hello am getting
{
"detail": "Unsupported media type \"text/plain\" in request."
}
this error in post man and
Unsupported Media Type: /api/people/
[25/Sep/2023 12:51:31] "POST /api/people/ HTTP/1.1" 415 62
this error on terminal do anyone know how to resolve it
select json from postman you were sending as plain text
im getting this error obj = Person.objects.get(id=data['id'])
~~~~^^^^^^
KeyError: 'id' when i try to validate