X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/a9b4700e3cd649a6dddc3b72dc0bd632f7841c74..4334b1df511eb3a8161e9a98b1d3f00777e4e054:/src/catalogue/views.py?ds=inline diff --git a/src/catalogue/views.py b/src/catalogue/views.py index 5be41462..4ae5c742 100644 --- a/src/catalogue/views.py +++ b/src/catalogue/views.py @@ -141,6 +141,15 @@ class WLURITerms(Terms): class serializer_class(serializers.Serializer): label = serializers.CharField(source='wluri') +class ThemaTerms(Terms): + queryset = models.Thema.objects.filter(usable=True, hidden=False) + search_fields = ['code', 'name', 'description'] + + class serializer_class(serializers.Serializer): + label = serializers.CharField(source='code') + name = serializers.CharField() + description = serializers.CharField() + class WikidataView(APIView): permission_classes = [IsAdminUser]