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>
22 lines
530 B
Python
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'
|
|
)
|