Added django admin module to manage instance policies

merge-requests/552/head
Eliot Berriot 2019-01-10 11:08:05 +01:00
rodzic 993a0092c2
commit d63f8f2e33
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: DD6965E2476E5C27
1 zmienionych plików z 30 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,30 @@
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