Files
mayan-edms/mayan/apps/ocr/serializers.py
Roberto Rosario c2dd01d51e Refactor the OCR app API
This refactor adds two new endpoints to view the OCR
content of versions and documents.

Signed-off-by: Roberto Rosario <Roberto.Rosario.Gonzalez@mayan-edms.com>
2019-02-19 03:21:36 -04:00

22 lines
530 B
Python

from __future__ import unicode_literals
from rest_framework import serializers
class DocumentOCRSerializer(serializers.Serializer):
text = serializers.CharField(
read_only=True, source='get_ocr_content'
)
class DocumentPageOCRContentSerializer(serializers.Serializer):
text = serializers.CharField(
read_only=True, source='get_ocr_content'
)
class DocumentVersionOCRSerializer(serializers.Serializer):
text = serializers.CharField(
read_only=True, source='get_ocr_content'
)