wagtailapproval._signals

These are the signals used for internal behavior. Some of these are great places to start if you’re looking at adding your own types to your pipeline.

add_document(sender, approval_step, **kwargs)[source]

Builds the approval item list for documents

add_images(sender, approval_step, **kwargs)[source]

Builds the approval item list for images

add_pages(sender, approval_step, **kwargs)[source]

Builds the approval item list for pages

approvalticket_cascade_delete(sender, instance, **kwargs)[source]

This deletes objects from ApprovalTicket if they are deleted, to avoid leaking space (a deleted object would otherwise never be freed from the ticket database, as cascades don’t work for GenericForeignKey without a GenericRelation ). Essentially, this is a custom cascade delete.

assert_page_live(sender, giving_step, taking_step, object, pipeline, **kwargs)[source]
catch_collection_objects(sender, instance, created, **kwargs)[source]

If newly-created objects are created inside of a collection that is owned by an ApprovalStep, it will automatically take ownership of those objects

delete_owned_group_and_collection(sender, instance, **kwargs)[source]

This deletes the owned group and collection from ApprovalStep when the step is deleted.

delete_owned_user(sender, instance, **kwargs)[source]

This deletes the owned user from ApprovalPipeline when the pipeline is deleted.

fix_restrictions(sender, instance, **kwargs)[source]

Update ApprovalStep restrictions on a save.

release_page_permissions(sender, approval_step, object, pipeline, **kwargs)[source]
send_published_signals(sender, instance, **kwargs)[source]

This simply watches for a published step or pipeline, and sends a pipeline_published() or step_published() signal for it.

set_document_collection_edit(sender, approval_step, edit, **kwargs)[source]

Sets collection permissions for documents

set_image_collection_edit(sender, approval_step, edit, **kwargs)[source]

Sets collection permissions for images

setup_group_and_collection(sender, instance, **kwargs)[source]

Create or rename the step’s owned groups and collections

setup_pipeline_user(sender, instance, **kwargs)[source]

Setup an ApprovalPipeline user

update_collection_ownership(sender, approval_step, object, pipeline, **kwargs)[source]

Individual take_ownerships for each type should be implemented that also take the collection member. This is a fallback in case something doesn’t work the way it should

update_document_ownership(sender, approval_step, object, pipeline, **kwargs)[source]
update_image_ownership(sender, approval_step, object, pipeline, **kwargs)[source]
update_page_ownership(sender, approval_step, object, pipeline, **kwargs)[source]