Hi there - new to Mezzanine, and I'm trying to integration
django-reversions into Mezzanine in order to have a nice record of all
changes going into the site and be able to walk back from changes if
necessary. http://django-reversion.readthedocs.org/en/latest/index.html
I've successfully mixed in the reversion.VersionAdmin class to things like
RichText page using this:
# adding reversion for RichText
page_fieldsets = deepcopy(PageAdmin.fieldsets)
class RichTextPageAdminWithReversion(reversion.VersionAdmin, PageAdmin):
history_latest_first = True
fieldsets = page_fieldsets
admin.site.unregister(RichTextPage)
admin.site.register(RichTextPage, RichTextPageAdminWithReversion)
and I've done the same for other types of content like blog posts and
links, etc.
This is working well, however there are two issues I've found.
Minor issue: For normal Admin display, adding a VersionAdmin adds a new
button to recover deleted models. However, since the Content Admin page is
so functionally specific to creating multiple types of content , there's no
way to see just the admin table for Pages, say, so that button "recover
deleted" will never show up. Is there a workaround to see more "normal"
admin list page for individual content types, so that if necessary the user
has access to the "recover deleted" button?
A bigger issue which again probably has to do with how the Admin is
customized, when I apply the same type of changes to the Settings object,
the entire Settings admin page fails to load the custom content, and
without the custom content there's no way to interact with the Settings
model. Again it would be good to keep a revision history of settings just
like all the other content. Code is like:
# TODO: trying to capture history of settings changes.
# making the below change compiles fine but causes the
# Settings Admin UI to not display.
settings_fieldsets = deepcopy(SettingsAdmin.fieldsets)
class MySettingsAdmin(reversion.VersionAdmin,SettingsAdmin):
history_latest_first = True
fieldsets = settings_fieldsets
admin.site.unregister(Setting)
admin.site.register(Setting, MySettingsAdmin)
Has anyone had experience integrating reversion or can offer some thoughts
on where to start to fix Settings especially?
Thanks! - John Briere
--
You received this message because you are subscribed to the Google Groups
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.