Status of django-reversion Integration

43 views
Skip to first unread message

Ahmad Khayyat

unread,
Nov 9, 2012, 4:36:58 AM11/9/12
to mezzani...@googlegroups.com
In this thread, a few alternatives of supporting django-reversion out-of-the-box were proposed:

1. In pages/admin.py:

if "reversion" in settings.INSTALLED_APPS:
    class VersionedPageAdmin(PageAdmin, VersionAdmin):
        """
        Versioned admin class for the ``Page`` model
        and all subclasses of ``Page``.
        """
        change_list_template = "admin/pages/page/change_list.html"
       
    admin.site.register(Page, VersionedPageAdmin)
    admin.site.register(
RichTextPage, VersionedPageAdmin)
else:
    admin.site.register(Page, PageAdmin)
    admin.site.register(
RichTextPage, PageAdmin)

2. In pages/admin.py:

class VersionedPageAdmin: # etc

    if "reversion" in settings.INSTALLED_APPS:
        PageAdmin = VersionedPageAdmin

    admin.site.register(Page, PageAdmin)
    admin.site.register(RichTextPage, PageAdmin)


3. Either of the above on DisplayableAdmin instead of PageAdmin

----------------------------------------------------------

1. Is this a fair summary? Did I miss any options?

2. Was any of these options (or others) found to work well enough to consider it at least for further testing?

3. Do templates need to be modified, or just overridden by some other existing templates?

Christian Bahls - gmail.com

unread,
Nov 9, 2012, 3:53:20 PM11/9/12
to mezzani...@googlegroups.com
Are there any Plans to do something similar to Blog posts?

Christian
Reply all
Reply to author
Forward
0 new messages