☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:
https://ko-fi.com/bugbytes
⭐Top resource to learn Python - https://datacamp.pxf.io/kOjKkV ⭐
In this video, we'll learn how to update nested / related objects when sending PUT requests in Django REST Framework. We'll show how to override the update() method on serializers, and also how to delete items in a DRF Viewset
Starter Code: https://github.com/bugbytes-io/drf-co...
📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro to serializer update() method
02:19 Defining PUT request to update an order
03:31 Changing serializer class for PUT requests
04:35 Writing serializer update() method to update object + nested objects
08:58 Making nested objects optional in POST and PUT requests
10:02 Wrapping update & create in database transactions
12:31 Delete requests to Rest Framework view sets
𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
📖 Blog: https://bugbytes.io/posts/
👾 Github: https://github.com/bugbytes-io/drf-co...
📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
DRF Serializers: https://www.django-rest-framework.org...
Classy DRF: https://www.cdrf.co/
#python #django #webdevelopment #djangorestframework