2015-12-20 19:23:33 +00:00
|
|
|
from django.apps import AppConfig
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class DocumentsConfig(AppConfig):
|
2016-03-28 11:11:15 +01:00
|
|
|
|
|
|
|
|
name = "documents"
|
|
|
|
|
|
|
|
|
|
def ready(self):
|
|
|
|
|
|
2016-06-23 21:57:17 +02:00
|
|
|
from .signals import document_consumption_started
|
2016-06-24 16:49:32 +02:00
|
|
|
from .signals import document_consumption_finished
|
2016-03-28 19:47:11 +01:00
|
|
|
from .signals.handlers import (
|
2016-06-24 16:49:32 +02:00
|
|
|
set_correspondent, set_tags, run_pre_consume_script,
|
|
|
|
|
run_post_consume_script)
|
|
|
|
|
|
|
|
|
|
document_consumption_started.connect(run_pre_consume_script)
|
2016-03-28 11:11:15 +01:00
|
|
|
|
|
|
|
|
document_consumption_finished.connect(set_tags)
|
|
|
|
|
document_consumption_finished.connect(set_correspondent)
|
2016-06-24 16:49:32 +02:00
|
|
|
document_consumption_finished.connect(run_post_consume_script)
|
2016-03-28 11:11:15 +01:00
|
|
|
|
|
|
|
|
AppConfig.ready(self)
|