Filtering ListAPIView in django-rest-framework

后端 未结 2 1832
猫巷女王i
猫巷女王i 2021-02-01 18:41

I\'m using ListAPIView, but I can\'t filter the results. My code is:

class UserPostReadView(generics.ListAPIView):
    serializer_class = PostSerializer
    mode         


        
2条回答
  •  北恋
    北恋 (楼主)
    2021-02-01 19:29

    I know is late for this, but I wrote a little app that extends for ListAPIView and do this easier, check it out:

    https://github.com/angvp/drf-lafv

提交回复
热议问题