Django Rest Framework: Dynamically return subset of fields

后端 未结 8 722
南笙
南笙 2020-11-28 18:16

Problem

As recommended in the blogpost Best Practices for Designing a Pragmatic RESTful API, I would like to add a fields query parameter to a Django R

8条回答
  •  臣服心动
    2020-11-28 19:05

    You could try Dynamic REST, which has support for dynamic fields (inclusion, exclusion), embedded / sideloaded objects, filtering, ordering, pagination, and more.

提交回复
热议问题