Finish the document parsing app.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -6,10 +6,10 @@ from django.utils.html import conditional_escape
|
||||
from .models import DocumentPageContent
|
||||
|
||||
|
||||
def get_document_ocr_content(document):
|
||||
def get_document_content(document):
|
||||
for page in document.pages.all():
|
||||
try:
|
||||
page_content = page.ocr_content.content
|
||||
page_content = page.content.content
|
||||
except DocumentPageContent.DoesNotExist:
|
||||
pass
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user