grammatical-error-correctio.../backend/translation/serializers.py

7 lines
263 B
Python
Raw Normal View History

2022-06-01 10:19:32 +02:00
from rest_framework import serializers
LANGUAGE_CHOICES = [('pl', 'Polish')]
class TranslationSerializer(serializers.Serializer):
text = serializers.CharField(max_length=20000, min_length = 1)
language = serializers.ChoiceField(choices=LANGUAGE_CHOICES)