Beispiel #1
0
class DetailSerializer(IrekuaHyperlinkedModelSerializer):
    licence_type = licences.SelectSerializer(many=False, read_only=True)
    signed_by = users.SelectSerializer(many=False, read_only=True)

    class Meta:
        model = Licence
        fields = ('url', 'id', 'licence_type', 'created_on', 'document',
                  'metadata', 'signed_by', 'is_active', 'collection')
Beispiel #2
0
class DetailSerializer(IrekuaHyperlinkedModelSerializer):
    user = users.SelectSerializer(many=False, read_only=True)
    collection = data_collections.SelectSerializer(many=False, read_only=True)

    class Meta:
        model = MODEL
        fields = (
            'url',
            'id',
            'collection',
            'user',
        )
class DetailSerializer(IrekuaModelSerializer):
    model_version = model_version.ListSerializer(read_only=True)
    item = items.ListSerializer(read_only=True)
    event_type = events.ListSerializer(read_only=True)
    labels = terms.ListSerializer(read_only=True, many=True)
    created_by = users.SelectSerializer(read_only=True)
    modified_by = users.SelectSerializer(read_only=True)

    class Meta:
        model = ModelPrediction
        fields = ('url', 'id', 'item', 'model_version', 'event_type',
                  'certainty', 'labels', 'annotation', 'created_by',
                  'modified_by', 'created_on', 'modified_on')

        extra_kwargs = {
            'labels': {
                'style': {
                    'base_template': 'input.html'
                }
            },
        }
Beispiel #4
0
class DetailSerializer(IrekuaModelSerializer):
    created_by = users.SelectSerializer(many=False, read_only=True)

    class Meta:
        model = MetaCollection
        fields = (
            'url',
            'name',
            'description',
            'created_by',
            'created_on',
            'modified_on',
        )
Beispiel #5
0
class DetailSerializer(IrekuaHyperlinkedModelSerializer):
    created_by = users.SelectSerializer(
        many=False,
        read_only=True)
    modified_by = users.SelectSerializer(
        many=False,
        read_only=True)
    sampling_event_type = types.SelectSerializer(
        many=False,
        read_only=True)
    collection = data_collections.SelectSerializer(
        many=False,
        read_only=True)
    licence = licences.SelectSerializer(
        many=False,
        read_only=True)
    collection_site = sites.SelectSerializer(
        many=False,
        read_only=True)

    class Meta:
        model = SamplingEvent
        fields = (
            'url',
            'id',
            'sampling_event_type',
            'collection_site',
            'commentaries',
            'metadata',
            'collection',
            'licence',
            'started_on',
            'ended_on',
            'created_by',
            'modified_by',
            'created_on',
            'modified_on',
        )
Beispiel #6
0
class DetailSerializer(IrekuaHyperlinkedModelSerializer):
    created_by = users.SelectSerializer(many=False, read_only=True)

    class Meta:
        model = Site
        fields = (
            'url',
            'id',
            'name',
            'locality',
            'created_by',
            'created_on',
            'modified_on',
        )
Beispiel #7
0
class DetailSerializer(IrekuaHyperlinkedModelSerializer):
    user = users.SelectSerializer(many=False, read_only=True)
    collection_type = types.SelectSerializer(many=False,
                                             read_only=True,
                                             source='collectiontype')

    class Meta:
        model = MODEL
        fields = (
            'url',
            'id',
            'collection_type',
            'user',
        )
Beispiel #8
0
class DetailSerializer(IrekuaHyperlinkedModelSerializer):
    user = users.SelectSerializer(many=False, read_only=True)
    role = roles.SelectSerializer(many=False, read_only=True)

    class Meta:
        model = CollectionUser
        fields = (
            'url',
            'user',
            'role',
            'metadata',
            'created_on',
            'modified_on',
        )
Beispiel #9
0
class DetailSerializer(IrekuaHyperlinkedModelSerializer):
    annotation = annotations.SelectSerializer(many=False, read_only=True)
    created_by = users.SelectSerializer(many=False, read_only=True)

    class Meta:
        model = AnnotationVote
        fields = (
            'url',
            'id',
            'annotation',
            'label',
            'created_by',
            'created_on',
            'modified_on',
        )
Beispiel #10
0
class DetailSerializer(IrekuaHyperlinkedModelSerializer):
    collection_device = devices.SelectSerializer(many=False, read_only=True)
    sampling_event = sampling_events.SelectSerializer(many=False,
                                                      read_only=True)
    licence = licences.SelectSerializer(many=False, read_only=True)
    created_by = users.SelectSerializer(many=False, read_only=True)
    modified_by = users.SelectSerializer(many=False, read_only=True)

    class Meta:
        model = SamplingEventDevice
        fields = (
            'url',
            'id',
            'sampling_event',
            'collection_device',
            'commentaries',
            'metadata',
            'configuration',
            'licence',
            'created_by',
            'created_on',
            'modified_on',
            'modified_by',
        )
class DetailSerializer(IrekuaHyperlinkedModelSerializer):
    source = terms.SelectSerializer(many=False, read_only=True)
    suggested_by = users.SelectSerializer(many=False, read_only=True)

    class Meta:
        model = SynonymSuggestion
        fields = (
            'url',
            'id',
            'source',
            'synonym',
            'description',
            'metadata',
            'suggested_by',
            'suggested_on',
        )
Beispiel #12
0
class DetailSerializer(IrekuaHyperlinkedModelSerializer):
    device = devices.SelectSerializer(many=False, read_only=True)
    owner = users.SelectSerializer(many=False, read_only=True)

    class Meta:
        model = PhysicalDevice
        fields = (
            'url',
            'serial_number',
            'owner',
            'metadata',
            'bundle',
            'device',
            'created_on',
            'modified_on',
        )