Update documents and ocr apps to register their statistics to the statistics app instead of the other way around
This commit is contained in:
@@ -13,6 +13,7 @@ from maintenance.api import register_maintenance_links
|
||||
from history.permissions import PERMISSION_HISTORY_VIEW
|
||||
from project_setup.api import register_setup
|
||||
from acls.api import class_permissions
|
||||
from statistics.api import register_statistics
|
||||
|
||||
from .models import (Document, DocumentPage,
|
||||
DocumentPageTransformation, DocumentType, DocumentTypeFilename,
|
||||
@@ -44,6 +45,7 @@ from .links import (document_page_transformation_list, document_page_transformat
|
||||
document_multiple_clear_transformations, document_multiple_delete,
|
||||
document_multiple_download)
|
||||
from .links import document_clear_image_cache
|
||||
from .statistics import get_statistics
|
||||
|
||||
# Register document type links
|
||||
bind_links([DocumentType], [document_type_document_list, document_type_filename_list, document_type_edit, document_type_delete])
|
||||
@@ -127,3 +129,5 @@ class_permissions(Document, [
|
||||
PERMISSION_DOCUMENT_VERSION_REVERT,
|
||||
PERMISSION_HISTORY_VIEW
|
||||
])
|
||||
|
||||
register_statistics(get_statistics)
|
||||
|
||||
@@ -15,8 +15,8 @@ from documents.models import Document, DocumentVersion
|
||||
from maintenance.api import register_maintenance_links
|
||||
from project_tools.api import register_tool
|
||||
from acls.api import class_permissions
|
||||
|
||||
from scheduler.api import register_interval_job
|
||||
from statistics.api import register_statistics
|
||||
|
||||
from .conf.settings import (AUTOMATIC_OCR, QUEUE_PROCESSING_INTERVAL)
|
||||
from .models import DocumentQueue, QueueTransformation
|
||||
@@ -24,6 +24,7 @@ from .tasks import task_process_document_queues
|
||||
from .permissions import PERMISSION_OCR_DOCUMENT
|
||||
from .exceptions import AlreadyQueued
|
||||
from . import models as ocr_models
|
||||
from .statistics import get_statistics
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -91,3 +92,5 @@ register_tool(ocr_tool_link)
|
||||
class_permissions(Document, [
|
||||
PERMISSION_OCR_DOCUMENT,
|
||||
])
|
||||
|
||||
register_statistics(get_statistics)
|
||||
|
||||
Reference in New Issue
Block a user