Remove the view to submit all document for OCR.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-08-24 04:04:31 -04:00
parent a944226814
commit 3fe0d47126
4 changed files with 6 additions and 33 deletions
-17
View File
@@ -23,23 +23,6 @@ from .permissions import (
from .utils import get_document_ocr_content
class DocumentAllSubmitView(ConfirmView):
extra_context = {'title': _('Submit all documents for OCR?')}
def get_post_action_redirect(self):
return reverse('common:tools_list')
def view_action(self):
count = 0
for document in Document.objects.all():
document.submit_for_ocr()
count += 1
messages.success(
self.request, _('%d documents added to the OCR queue.') % count
)
class DocumentOCRContent(SingleObjectDetailView):
form_class = DocumentOCRContentForm
model = Document