Hi all,
I'm following guide to define serializers 
http://www.django-rest-framework.org/tutorial/1-serialization/
I would like to modified data before saving to database, but when I check 
in function create() validated_data value it's returns null object.
I'm using http post.
Could you guys please help me?



*Views.py*


<https://lh3.googleusercontent.com/-i8nwkZ-bMOg/WVKaHwWM1WI/AAAAAAAACwA/s1Mv69ZMFyo5Cw-cCaPT84n6KdA15myOACEwYBhgL/s1600/code%2Bviews.JPG>

*Serializers.py* 
<https://lh3.googleusercontent.com/-i8nwkZ-bMOg/WVKaHwWM1WI/AAAAAAAACwA/s1Mv69ZMFyo5Cw-cCaPT84n6KdA15myOACEwYBhgL/s1600/code%2Bviews.JPG>

<https://lh3.googleusercontent.com/-XXiu0q2ZyS4/WVKao9Mg46I/AAAAAAAACwI/eoc4DG3cyPAxp5hWSQyesgyrYuUzy390QCLcBGAs/s1600/serializers.JPG>
*Console used to check validated_data value, it's returns null object* 
<https://lh3.googleusercontent.com/-i8nwkZ-bMOg/WVKaHwWM1WI/AAAAAAAACwA/s1Mv69ZMFyo5Cw-cCaPT84n6KdA15myOACEwYBhgL/s1600/code%2Bviews.JPG>



<https://lh3.googleusercontent.com/-YDejiw8DhtA/WVKbHl5pjjI/AAAAAAAACwM/fNHkRkPcNScF9pZs8lsRxIjvrmXmRI__QCLcBGAs/s1600/console.JPG>
Thanks, 
<https://lh3.googleusercontent.com/-i8nwkZ-bMOg/WVKaHwWM1WI/AAAAAAAACwA/s1Mv69ZMFyo5Cw-cCaPT84n6KdA15myOACEwYBhgL/s1600/code%2Bviews.JPG>

Hon Trang
<https://lh3.googleusercontent.com/-i8nwkZ-bMOg/WVKaHwWM1WI/AAAAAAAACwA/s1Mv69ZMFyo5Cw-cCaPT84n6KdA15myOACEwYBhgL/s1600/code%2Bviews.JPG>

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to