1 from django
.contrib
import admin
3 from mygpo
.usersettings
.models
import UserSettings
6 @admin.register(UserSettings
)
7 class PodcastConfigAdmin(admin
.ModelAdmin
):
9 # configuration for the list view
10 list_display
= ("user", "content_object")
12 # fetch the related objects for the fields in list_display
13 list_select_related
= ("user",)
15 raw_id_fields
= ("user",)
17 show_full_result_count
= False
19 def get_queryset(self
, request
):
20 return super().get_queryset(request
).prefetch_related("content_object")