X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/82b3920c64a77f00e2b38d8f0e1601cd74e427e4..87bd94a94dc6cc3dbf47db2bdd17761b3f400138:/src/catalogue/admin.py?ds=sidebyside diff --git a/src/catalogue/admin.py b/src/catalogue/admin.py index 77f1078c..614450eb 100644 --- a/src/catalogue/admin.py +++ b/src/catalogue/admin.py @@ -556,6 +556,14 @@ class PlaceAdmin(WikidataAdminMixin, TabbedTranslationAdmin): @admin.register(models.Thema) class ThemaAdmin(admin.ModelAdmin): - list_display = ['code', 'name', 'usable', 'hidden'] - list_filter = ['usable', 'hidden'] - search_fields = ['code', 'name', 'description'] + list_display = ['code', 'name', 'usable', 'hidden', 'woblink_category'] + list_filter = ['usable', 'usable_as_main', 'hidden'] + search_fields = ['code', 'name', 'description', 'public_description'] + prepopulated_fields = {"slug": ["name"]} + + +@admin.register(models.Audience) +class ThemaAdmin(admin.ModelAdmin): + list_display = ['code', 'name', 'thema'] + search_fields = ['code', 'name', 'description', 'thema'] + prepopulated_fields = {"slug": ["name"]}