I have a Django model Offer with field like name ... and bandwidth_value and bandwidth_unit. I use Django REST framework class ModelSerializer to serialize my model. I have :
{"id": 10,"max_devices":5,"bandwidth_value":"100.00","bandwidth_unit":"M"}
And I want to have ;
{"id": 10,"max_devices":5,"bandwidth":{"value":"100.00","unit":"M"}}
How can I do ?