Browse Source

Enable to order examples by score

pull/2028/head
Hironsan 2 years ago
parent
commit
3f0e2c2be6
1 changed files with 1 additions and 1 deletions
  1. 2
      backend/examples/views/example.py

2
backend/examples/views/example.py

@ -18,7 +18,7 @@ class ExampleList(generics.ListCreateAPIView):
serializer_class = ExampleSerializer
permission_classes = [IsAuthenticated & (IsProjectAdmin | IsProjectStaffAndReadOnly)]
filter_backends = (DjangoFilterBackend, filters.SearchFilter, filters.OrderingFilter)
ordering_fields = ("created_at", "updated_at")
ordering_fields = ("created_at", "updated_at", "score")
search_fields = ("text", "filename")
model = Example
filter_class = ExampleFilter

Loading…
Cancel
Save