class LicenceViewSet(PermissionInClassModelViewSet, viewsets.ModelViewSet): queryset = models.Licence.objects.all() serializer_class = serializers.modelserializer_factory(models.Licence, fields=['id', 'name'])
class AudienceRoleViewSet(PermissionInClassModelViewSet, viewsets.ModelViewSet): queryset = models.AudienceRole.objects.all() serializer_class = serializers.modelserializer_factory(models.AudienceRole, fields=['id', 'audienceRole'])
class FieldViewSet(PermissionInClassModelViewSet, viewsets.ModelViewSet): queryset = models.Field.objects.all() serializer_class = serializers.modelserializer_factory(models.Field, fields=['id', 'field'])
class EventCostViewSet(PermissionInClassModelViewSet, viewsets.ModelViewSet): queryset = models.EventCost.objects.all() serializer_class = serializers.modelserializer_factory(models.EventCost, fields=['id', 'cost'])
class TopicViewSet(MultipleFieldLookupMixin, PermissionInClassModelViewSet, viewsets.ModelViewSet): queryset = models.Topic.objects.all() serializer_class = serializers.modelserializer_factory(models.Topic, fields=['id', 'uri', 'label']) lookup_fields = ['pk', 'uri__endswith']
class OperatingSystemChoicesViewSet(PermissionInClassModelViewSet, viewsets.ModelViewSet): queryset = models.OperatingSystem.objects.all() serializer_class = serializers.modelserializer_factory(models.OperatingSystem, fields=['id', 'name']) lookup_field = 'name'