Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decoupling the creation of revisions from main application logic #984

Open
ogenodisho opened this issue Feb 25, 2025 · 0 comments
Open

Decoupling the creation of revisions from main application logic #984

ogenodisho opened this issue Feb 25, 2025 · 0 comments

Comments

@ogenodisho
Copy link

I'm looking into using this library as a solution to my version history problem.

One thing I'm trying to figure out is if there's a way to decouple the creation of revisions from the main application logic.

The docs say that in order for a revision to be created, you have to wrap the .save() calls in your main application logic with reversion.create_revision().

This is simple but it does require changes to my main application logic (both existing and future), so I was wondering if there's a way for this to be decoupled.

For example, would it be possible to set up post-save Django Signals in my application which create the revisions? That way, my main application logic doesn't have to care about creating the revisions - it just saves the model and the revisions are created by the signals in place.

Any help is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant