Versioning database content with
The following steps should be followed to integrate the page module with django-reversion:
'reversion'to the list of installed applications.
Page.register_with_reversion(**kwargs)after all content types have been created (after all
create_content_typeinvocations). You can optionally supply kwargs that will be passed to
FEINCMS_USE_PAGE_ADMIN = Falseto your
Now, you need to create your own model admin subclass inheriting from both
PageAdmin and from reversions
from django.contrib import admin from feincms.module.page.models import Page from feincms.module.page.modeladmins import PageAdmin from reversion.admin import VersionAdmin class VersionedPageAdmin(PageAdmin, VersionAdmin): pass admin.site.register(Page, VersionedPageAdmin)
VersionedPageAdmin does not look like the ItemEditor – it’s
welcome, but the basic functionality needed for versioning page content
Finally, you should ensure that initial revisions are created using
createinitialrevisions management command.
You should ensure that you’re using a reversion release which is compatible with your installed Django version. The reversion documentation contains an up-to-date list of compatible releases.
The reversion support in FeinCMS requires at least django-reversion 1.6.
Only the Page module is versioned. MediaFiles are not. If a user deletes an
image from the MediaLibrary by accident it cannot be recovered.
Furthermore, if the position of a page has been moved within the tree,
the recovery will break the tree structure.
You can try to fix it using the