mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 06:59:17 +02:00
Fixed #80: Added admin interface for radios, track files, favorites...
This commit is contained in:
parent
c89212379d
commit
e13ac32370
6 changed files with 113 additions and 3 deletions
48
api/funkwhale_api/radios/admin.py
Normal file
48
api/funkwhale_api/radios/admin.py
Normal file
|
@ -0,0 +1,48 @@
|
|||
from django.contrib import admin
|
||||
|
||||
from . import models
|
||||
|
||||
|
||||
@admin.register(models.Radio)
|
||||
class RadioAdmin(admin.ModelAdmin):
|
||||
list_display = [
|
||||
'user', 'name', 'is_public', 'creation_date', 'config']
|
||||
list_select_related = [
|
||||
'user',
|
||||
]
|
||||
list_filter = [
|
||||
'is_public',
|
||||
]
|
||||
search_fields = ['name', 'description']
|
||||
|
||||
|
||||
@admin.register(models.RadioSession)
|
||||
class RadioSessionAdmin(admin.ModelAdmin):
|
||||
list_display = [
|
||||
'user',
|
||||
'custom_radio',
|
||||
'radio_type',
|
||||
'creation_date',
|
||||
'related_object']
|
||||
|
||||
list_select_related = [
|
||||
'user',
|
||||
'custom_radio'
|
||||
]
|
||||
list_filter = [
|
||||
'radio_type',
|
||||
]
|
||||
|
||||
|
||||
@admin.register(models.RadioSessionTrack)
|
||||
class RadioSessionTrackAdmin(admin.ModelAdmin):
|
||||
list_display = [
|
||||
'id',
|
||||
'session',
|
||||
'position',
|
||||
'track',]
|
||||
|
||||
list_select_related = [
|
||||
'track',
|
||||
'session'
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue