How to add or remove fields from a serializer based on a condition?

后端 未结 0 1220
失恋的感觉
失恋的感觉 2021-01-11 12:28

I\'m creating a simple Todo app and I want to provide an api for it. A todo task maybe completed or not. if it\'s not completed yet, then the field Todo.date_completed

相关标签:
回答
  • 消灭零回复
提交回复
热议问题