mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 13:49:26 +02:00
Views and logic for custom radios
This commit is contained in:
parent
df63252105
commit
e7f0c1b88b
13 changed files with 774 additions and 18 deletions
|
@ -116,13 +116,7 @@ class TrackViewSet(TagViewSetMixin, SearchMixin, viewsets.ReadOnlyModelViewSet):
|
|||
"""
|
||||
A simple ViewSet for viewing and editing accounts.
|
||||
"""
|
||||
queryset = (models.Track.objects.all()
|
||||
.select_related()
|
||||
.select_related('album__artist')
|
||||
.prefetch_related(
|
||||
'tags',
|
||||
'files',
|
||||
'artist__albums__tracks__tags'))
|
||||
queryset = (models.Track.objects.all().for_nested_serialization())
|
||||
serializer_class = serializers.TrackSerializerNested
|
||||
permission_classes = [ConditionalAuthentication]
|
||||
search_fields = ['title', 'artist__name']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue