Move signal handlers into their own app module
This commit is contained in:
@@ -11,6 +11,7 @@ from common.utils import encapsulate
|
||||
from documents.models import Document
|
||||
from navigation.api import register_model_list_columns
|
||||
|
||||
from .handlers import launch_workflow
|
||||
from .models import (
|
||||
Workflow, WorkflowInstance, WorkflowInstanceLogEntry, WorkflowState,
|
||||
WorkflowTransition
|
||||
@@ -27,11 +28,6 @@ from .links import (
|
||||
)
|
||||
|
||||
|
||||
def launch_workflow(sender, instance, created, **kwargs):
|
||||
if created:
|
||||
Workflow.objects.launch_for(instance)
|
||||
|
||||
|
||||
class DocumentStatesApp(apps.AppConfig):
|
||||
name = 'document_states'
|
||||
verbose_name = _('Document states')
|
||||
|
||||
Reference in New Issue
Block a user