2019-01-10 10:08:05 +00:00
|
|
|
from funkwhale_api.common import admin
|
|
|
|
|
|
|
|
from . import models
|
|
|
|
|
|
|
|
|
|
|
|
@admin.register(models.InstancePolicy)
|
|
|
|
class InstancePolicyAdmin(admin.ModelAdmin):
|
|
|
|
list_display = [
|
|
|
|
"actor",
|
|
|
|
"target_domain",
|
|
|
|
"target_actor",
|
|
|
|
"creation_date",
|
|
|
|
"block_all",
|
|
|
|
"reject_media",
|
|
|
|
"silence_activity",
|
|
|
|
"silence_notifications",
|
|
|
|
]
|
|
|
|
list_filter = [
|
|
|
|
"block_all",
|
|
|
|
"reject_media",
|
|
|
|
"silence_activity",
|
|
|
|
"silence_notifications",
|
|
|
|
]
|
|
|
|
search_fields = [
|
|
|
|
"actor__fid",
|
|
|
|
"target_domain__name",
|
|
|
|
"target_domain__actor__fid",
|
|
|
|
"summary",
|
|
|
|
]
|
|
|
|
list_select_related = True
|
2019-02-14 09:49:06 +00:00
|
|
|
|
|
|
|
|
2019-08-28 09:32:08 +00:00
|
|
|
@admin.register(models.Report)
|
|
|
|
class ReportAdmin(admin.ModelAdmin):
|
|
|
|
list_display = [
|
|
|
|
"uuid",
|
|
|
|
"submitter",
|
|
|
|
"type",
|
|
|
|
"assigned_to",
|
|
|
|
"is_handled",
|
|
|
|
"creation_date",
|
|
|
|
"handled_date",
|
|
|
|
]
|
2019-08-29 09:45:41 +00:00
|
|
|
list_filter = ["type", "is_handled"]
|
|
|
|
search_fields = ["summary"]
|
2019-08-28 09:32:08 +00:00
|
|
|
list_select_related = True
|
|
|
|
|
|
|
|
|
2019-02-14 09:49:06 +00:00
|
|
|
@admin.register(models.UserFilter)
|
|
|
|
class UserFilterAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ["uuid", "user", "target_artist", "creation_date"]
|
|
|
|
search_fields = ["target_artist__name", "user__username", "user__email"]
|
|
|
|
list_select_related = True
|