mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-09 00:05:21 +01:00
- document index - api access for thumbnails/downloads - more api filters updated - pipfile removed - filename handling - legacy thumb/download access - obsolete admin gui settings (per page items, FY, inline view)
33 lines
1 KiB
Python
33 lines
1 KiB
Python
from django.apps import AppConfig
|
|
from django.db.models.signals import post_delete
|
|
|
|
|
|
class DocumentsConfig(AppConfig):
|
|
|
|
name = "documents"
|
|
|
|
def ready(self):
|
|
|
|
from .signals import document_consumption_started
|
|
from .signals import document_consumption_finished
|
|
from .signals.handlers import (
|
|
classify_document,
|
|
add_inbox_tags,
|
|
run_pre_consume_script,
|
|
run_post_consume_script,
|
|
cleanup_document_deletion,
|
|
set_log_entry,
|
|
index_document
|
|
)
|
|
|
|
document_consumption_started.connect(run_pre_consume_script)
|
|
|
|
document_consumption_finished.connect(classify_document)
|
|
document_consumption_finished.connect(index_document)
|
|
document_consumption_finished.connect(add_inbox_tags)
|
|
document_consumption_finished.connect(set_log_entry)
|
|
document_consumption_finished.connect(run_post_consume_script)
|
|
|
|
post_delete.connect(cleanup_document_deletion)
|
|
|
|
AppConfig.ready(self)
|