ferrosoft.apps.befundung.api package¶
Submodules¶
ferrosoft.apps.befundung.api.router module¶
ferrosoft.apps.befundung.api.serializers module¶
- class ferrosoft.apps.befundung.api.serializers.ExaminationSerializer(*args, **kwargs)[source]¶
Bases:
ModelSerializer- class Meta[source]¶
Bases:
object- fields = ['id', 'weighing_slip_id', 'trader_approval', 'comment', 'exam_date', 'material', 'license_plate_no', 'auditor_token', 'customer_name', 'refused_material', 'reductions', 'refusals', 'photos']¶
- model¶
alias of
Examination
- create(validated_data)[source]¶
We have a bit of extra checking around this in order to provide descriptive messages when something goes wrong, but this method is essentially just:
return ExampleModel.objects.create(**validated_data)
If there are many to many fields present on the instance then they cannot be set until the model is instantiated, in which case the implementation is like so:
example_relationship = validated_data.pop(‘example_relationship’) instance = ExampleModel.objects.create(**validated_data) instance.example_relationship = example_relationship return instance
The default implementation also does not handle nested relationships. If you want to support writable nested relationships you’ll need to write an explicit .create() method.
- class ferrosoft.apps.befundung.api.serializers.PhotoSerializer(*args, **kwargs)[source]¶
Bases:
ModelSerializer
- class ferrosoft.apps.befundung.api.serializers.ReductionSerializer(*args, **kwargs)[source]¶
Bases:
ModelSerializer
ferrosoft.apps.befundung.api.views module¶
- class ferrosoft.apps.befundung.api.views.ExaminationViewSet(**kwargs)[source]¶
Bases:
ModelViewSetAPI endpoint for examination reports of materials.
- basename = None¶
- description = None¶
- detail = None¶
- name = None¶
- permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>]¶
- queryset = <QuerySet [Examination]>¶
- serializer_class¶
alias of
ExaminationSerializer
- suffix = None¶