Skip to content

Signals sent by django reversion

etianen edited this page Jun 6, 2012 · 4 revisions

django-reversion provides a number of custom signals that can be used to tie-in additional functionality to the version creation mechanism.

Important: Don't connect to the pre_save or post_save signals of the Version or Revision models directly, use the signals outlined below instead. The pre_save and post_save signals will no longer be sent by the Version or Revision models in django-reversion 1.7.

reversion.pre_revision_commit

This signal is triggered just before a revision is saved to the database. It receives the following keyword arguments:

  • instances - A list of the model instances in the revision.
  • revision - The unsaved Revision model.
  • versions - The unsaved Version models in the revision.

reversion.post_revision_commit

This signal is triggered just after a revision is saved to the database. It receives the following keyword arguments:

  • instances - A list of the model instances in the revision.
  • revision - The saved Revision model.
  • versions - The saved Version models in the revision.

Clone this wiki locally