admin.py 484 Bytes
Newer Older
1
from funkwhale_api.common import admin
2
3
4
5
6
7

from . import models


@admin.register(models.Playlist)
class PlaylistAdmin(admin.ModelAdmin):
Eliot Berriot's avatar
Eliot Berriot committed
8
9
    list_display = ["name", "user", "privacy_level", "creation_date"]
    search_fields = ["name"]
10
11
12
13
14
    list_select_related = True


@admin.register(models.PlaylistTrack)
class PlaylistTrackAdmin(admin.ModelAdmin):
Eliot Berriot's avatar
Eliot Berriot committed
15
16
    list_display = ["playlist", "track", "index"]
    search_fields = ["track__name", "playlist__name"]
17
    list_select_related = True