-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add support for django-reversion. #11
Comments
@vdboor how hard do you think this one? |
Reversion support would be great. Any tips on the roadblocks or how they might be worked around? I'd like to look into this as well. Alternatively, any other options for versioning that are compatible with fluent? |
I'm not sure how hard this is, I didn't work with reversion before.
For the content items that fluent-contents provides, you could implement a versioning system within fluent-contents itself. Each ContentItem is linked to it's parent and we already implement multilingual support there by filtering on the 'language_code' field. It could be trivial to filter by "version" too if "0" is always the current version. I've just discovered django-widgy last week (somewhat comparable to fluent-contents, we could even make a fluentcms-widgy package to add a "WidgyPage"). Sadly they only add versioning for the content, and not the whole page. Ideally I'd love to see the whole page getting revisioned/versioned. |
I noticed that Aldryn is actively using django-parler for multilingual support, and they have written a version adapter for it. It's worth looking at, and if anyone would be able to port that into a module for parler, I'd be very happy! See: |
FYI we are working on adding support for versioning of Fluent and Flat pages using django-reversion in this fork: https://github.com/ixc/django-fluent-pages/tree/reversion_support The fork is partly based on https://github.com/aldryn/aldryn-reversion though without the support for plugins. It is not quite mature enough to become a pull request just yet, but we are getting there and plan to help towards adding official versioning support if possible. In our environment basic versioning, revert, and restore of single-language Flat/Fluent pages is working. See the commit comments on the "reversion_support" branch for a rough guide to getting started. While this branch is still under development any testing by, or feedback from, others in the community would be great! @vdboor Maybe we should open a PR despite the code being very much in-flux, to have a better place to discuss? Whatever you prefer. |
Wow, thanks a lot for the work so far! This will require some digging into the solution. Based on looking through the code, there are a few things I wonder:
I'm fine with keeping the discussion here, it's a 50/50 choice imho. btw, if you have some sites running on django-fluent, I'd love to add those to https://django-fluent.org/showcase/ :) |
Hi @vdboor thanks for the comments and questions. Sorry for the late reply, the code branch has been in a lot of flux and I wanted to get it (somewhat) more stable before replying. Based on your feedback I have updated the integration to automatically support versioning by modifying the relevant admin classes to extend the integration versions if
|
I should note that with the latest commit to our integration branch we are back to using the official 1.9.3 release of django-reversion, instead of our forked and patched version. |
So that a page can be reverted to a previous version.
The text was updated successfully, but these errors were encountered: