X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/a9b4700e3cd649a6dddc3b72dc0bd632f7841c74..fbedc8f26f2879a46629edc72ce20e3e85135523:/src/catalogue/views.py?ds=sidebyside 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]