摘要: 根据是否有pk 切换序列化器 get_serializer_class源码 def get_serializer_class(self): """ Return the class to use for the serializer. Defaults to using `self.serializ 阅读全文
posted @ 2022-10-11 10:48 Sherwin_szw 阅读(33) 评论(0) 推荐(0)
摘要: ListModelMixin 源码 class ListModelMixin: """ List a queryset. """ def list(self, request, *args, **kwargs): queryset = self.filter_queryset(self.get_qu 阅读全文
posted @ 2022-10-11 08:25 Sherwin_szw 阅读(41) 评论(0) 推荐(0)