Does django-reversion require me to re-define all of my model pre_save & post_save signals?

400 views Asked by At

I recently added django-reversion to my project to keep a history of model changes. Now, any time I save a model in my system, I get the following warning in the log:

.../site-packages/reversion/models.py:218: UserWarning: pre_save and post_save signals will not longer be sent for Revision and Version models in django-reversion 1.8. Please use the pre_revision_commit and post_revision_commit signals instead.

However, I'm not using the pre_save and post_save signals on the Revision and Version models themselves, or anything that extends thoseā€¦ Is this warning saying that I need to change the pre_save and post_save signals on any model in my project that makes use of versioning??

1

There are 1 answers

0
samcheng On

No, the deprecated signals are not for any model, they are just for the Revision and Version models. You can continue to use the pre_save and post_save signals on your own models.

http://django-reversion.readthedocs.org/en/latest/signals.html?highlight=post_save

I'm sure you've figured it out in the intervening 10 months, but I thought I'd clarify for the next visitor.