backend/checker/api/serializers.py

17 lines
407 B
Python
Raw Normal View History

2022-08-26 20:04:45 +03:00
from rest_framework import serializers
from checker.models import Docx
class DocxSerializer(serializers.ModelSerializer):
class Meta:
model = Docx
fields = ["uuid", "file"]
extra_kwargs = {"uuid": {"read_only": True}}
2022-08-27 07:38:54 +03:00
class DocxStateSerializer(serializers.ModelSerializer):
class Meta:
model = Docx
fields = ["paragraphs_loaded", "paragraphs_processed"]