diff --git a/wagtail/admin/signals.py b/wagtail/admin/signals.py index f1c1bcb28a..746c40abe7 100644 --- a/wagtail/admin/signals.py +++ b/wagtail/admin/signals.py @@ -1,4 +1,5 @@ from django.dispatch import Signal -init_new_page = Signal(providing_args=['page', 'parent']) +# provides args: page, parent +init_new_page = Signal() diff --git a/wagtail/core/signals.py b/wagtail/core/signals.py index 8420f385e9..a2c8e37c2a 100644 --- a/wagtail/core/signals.py +++ b/wagtail/core/signals.py @@ -1,17 +1,46 @@ from django.dispatch import Signal -page_published = Signal(providing_args=['instance', 'revision']) -page_unpublished = Signal(providing_args=['instance']) -pre_page_move = Signal(providing_args=['instance', 'parent_page_before', 'parent_page_after', 'url_path_before', 'url_path_after']) -post_page_move = Signal(providing_args=['instance', 'parent_page_before', 'parent_page_after', 'url_path_before', 'url_path_after']) +# Page signals -workflow_approved = Signal(providing_args=['instance', 'user']) -workflow_rejected = Signal(providing_args=['instance', 'user']) -workflow_cancelled = Signal(providing_args=['instance', 'user']) -workflow_submitted = Signal(providing_args=['instance', 'user']) +# provides args: instance, revision +page_published = Signal() -task_approved = Signal(providing_args=['instance', 'user']) -task_rejected = Signal(providing_args=['instance', 'user']) -task_submitted = Signal(providing_args=['instance', 'user']) -task_cancelled = Signal(providing_args=['instance' 'user']) +# provides args: instance +page_unpublished = Signal() + +# provides args: instance, parent_page_before, parent_page_after, url_path_before, url_path_after +pre_page_move = Signal() + +# provides args: instance, parent_page_before, parent_page_after, url_path_before, url_path_after +post_page_move = Signal() + + +# Workflow signals + +# provides args: instance, user +workflow_approved = Signal() + +# provides args: instance, user +workflow_rejected = Signal() + +# provides args: instance, user +workflow_cancelled = Signal() + +# provides args: instance, user +workflow_submitted = Signal() + + +# Workflow task signals + +# provides args: instance, user +task_approved = Signal() + +# provides args: instance, user +task_rejected = Signal() + +# provides args: instance, user +task_submitted = Signal() + +# provides args: instance, user +task_cancelled = Signal() diff --git a/wagtail/documents/models.py b/wagtail/documents/models.py index 95bd4cfbca..dbbffec21e 100644 --- a/wagtail/documents/models.py +++ b/wagtail/documents/models.py @@ -207,7 +207,8 @@ class Document(AbstractDocument): ] -document_served = Signal(providing_args=['request']) +# provides args: request +document_served = Signal() class UploadedDocument(models.Model):