mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 18:34:21 +02:00
Fixed #50: ordering for favorites
This commit is contained in:
parent
04c70116c3
commit
6ad8b212cf
6 changed files with 124 additions and 30 deletions
|
@ -95,7 +95,12 @@ class TrackViewSet(TagViewSetMixin, SearchMixin, viewsets.ReadOnlyModelViewSet):
|
|||
serializer_class = serializers.TrackSerializerNested
|
||||
permission_classes = [ConditionalAuthentication]
|
||||
search_fields = ['title', 'artist__name']
|
||||
ordering_fields = ('creation_date',)
|
||||
ordering_fields = (
|
||||
'creation_date',
|
||||
'title',
|
||||
'album__title',
|
||||
'artist__name',
|
||||
)
|
||||
|
||||
def get_queryset(self):
|
||||
queryset = super().get_queryset()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue