doc: CustomListmixin添加注释
This commit is contained in:
parent
ac49088efa
commit
e695543932
|
@ -175,11 +175,17 @@ class BulkDestroyModelMixin(DestroyModelMixin):
|
||||||
return Response(status=204)
|
return Response(status=204)
|
||||||
|
|
||||||
class CustomListModelMixin(ListModelMixin):
|
class CustomListModelMixin(ListModelMixin):
|
||||||
|
|
||||||
@swagger_auto_schema(manual_parameters=[
|
@swagger_auto_schema(manual_parameters=[
|
||||||
openapi.Parameter(name="query", in_=openapi.IN_QUERY, description="定制返回数据",
|
openapi.Parameter(name="query", in_=openapi.IN_QUERY, description="定制返回数据",
|
||||||
type=openapi.TYPE_STRING, required=False),
|
type=openapi.TYPE_STRING, required=False),
|
||||||
])
|
])
|
||||||
def list(self, request, *args, **kwargs):
|
def list(self, request, *args, **kwargs):
|
||||||
|
"""
|
||||||
|
获取列表
|
||||||
|
|
||||||
|
获取列表
|
||||||
|
"""
|
||||||
queryset = self.filter_queryset(self.get_queryset())
|
queryset = self.filter_queryset(self.get_queryset())
|
||||||
|
|
||||||
page = self.paginate_queryset(queryset)
|
page = self.paginate_queryset(queryset)
|
||||||
|
|
Loading…
Reference in New Issue