feat: paper list添加两个筛选条件
This commit is contained in:
parent
f7d14634f8
commit
d813a53652
|
|
@ -9,7 +9,8 @@ from rest_framework.permissions import AllowAny
|
||||||
class PaperViewSet(CustomGenericViewSet, CustomListModelMixin):
|
class PaperViewSet(CustomGenericViewSet, CustomListModelMixin):
|
||||||
queryset = Paper.objects.all()
|
queryset = Paper.objects.all()
|
||||||
serializer_class = PaperListSerializer
|
serializer_class = PaperListSerializer
|
||||||
filterset_fields = ["publication_year", "type", "fetch_status"]
|
filterset_fields = ["publication_year", "type", "fetch_status",
|
||||||
|
"has_abstract", "has_fulltext"]
|
||||||
search_fields = ['title', 'first_author', 'first_author_institution']
|
search_fields = ['title', 'first_author', 'first_author_institution']
|
||||||
ordering = ["-publication_date", "-create_time"]
|
ordering = ["-publication_date", "-create_time"]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue