Рет қаралды 15,739
In this video you will learn:
How to add extra fields to the API response using "SerializerMethodField".
How to declare a SerializerMethodField variable inside ModelSerializer class and use it to add an extra field to the serializer fields.
Define a private method inside the serializer class that will process some data and return the desired value of the extra field.
🎧 Music : • Study music | Programm...
Music Channel : @tuningthecode
Please enroll in the full course on Udemy:
www.udemy.com/course/python-d...
Source code:
github.com/CodeEnvironment/dj...
Django Rest Framework API #10 / Serializers , Model Serializer:
• Django Rest Framework ...
Django Rest Framework API #11 / ModelViewSet and Routers With Serializer
• Django Rest Framework ...
Django Rest Framework API #2 / Django Admin Panel
• Django Rest Framework ...