Signals

django-model-revisioning emits the following signals when dealing with revisions:

pre_revision

model_revisioning.signals.pre_save

Sent before creating a revision.

Arguments:

sender
The model class.
instance
The instance for which a revision is about to be created.

post_revision

model_revisioning.signals.post_save

Sent a revision has been created.

Arguments:

sender
The model class.
instance
The instance for which a revision has been created.
revision
The revision instance itself.

pre_change_head

model_revisioning.signals.pre_change_head

Sent before head gets changed on an object.

Arguments:

sender
The model class.
instance
The instance for which the head is about to change
current_head
The current head.
future_head
The head which is about to become the current.

post_change_head

model_revisioning.signals.post_change_head

Sent after head gets changed on an object.

Arguments:

sender
The model class.
instance
The instance for which the head is about to change
old_head
The head which used to be current.
new_head
The head which is now current.