Clarification on automatic revisions and context managers

Skip to first unread message

May 18, 2016, 8:29:15 PM5/18/16
to django-reversion discussion group
Hello!  Really enjoying working with django-reversion so far.  I think I've finished my initial integration, and then read something in the documentation that gave me pause.

By default, django-reversion saves a new revision whenever a model is saved, using the post_save signal. 

But that's not actually true, right?  From reading the source and using django-reversion, it seems that in addition to registering models of interest that I have to manage the creation of Revisions myself (through middleware, explicitly calling create_revision, etc.), and that the operation that gets automatically performed by RevisionManager._signal_receiver is the addition of a Version into the Revision's context.  There's no save to the database going on  until we exit the create_revision context or call revision_context_manager.end().

Do I understand correctly?  Thanks!

Dave Hall

May 19, 2016, 9:54:15 AM5/19/16
to django-reversion discussion group
Yes, you understand correctly. The documentation is a little unclear on this. If you could raise an issue about it on the project issue tracker, I'll attend to it next week.
You received this message because you are subscribed to the Google Groups "django-reversion discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

May 19, 2016, 12:07:14 PM5/19/16
to django-reversion discussion group
Thanks Dave!  I've opened

Thanks again for django-reversion - it's been a real pleasure to work with.  The archive of discussions in the group here have been very helpful as well
Reply all
Reply to author
0 new messages