etianen / django-reversion

django-reversion is an extension to the Django web framework that provides version control for model instances.
https://django-reversion.readthedocs.io
BSD 3-Clause "New" or "Revised" License
3.02k stars 488 forks source link

Using reversion with GeoDjango #74

Closed manelclos closed 12 years ago

manelclos commented 12 years ago

Hi,

I managed to get it working, the original class is class MyObjectAdmin(admin.GeoModelAdmin):

when changing it for: class MyObjectAdmin(VersionAdmin):

the Geo part will not work, obviously. So I tried multiple inheritance, and it does work: class MyObjectAdmin(admin.GeoModelAdmin, VersionAdmin):

Would you please check both classes to assure there are no collisions? I'll like to make sure before moving it into production.

Thanks in advance!

etianen commented 12 years ago

Hi,

I'm afraid that I can't really offer any guarantees about combining reversion with GeoDjango. I myself use the VersionAdmin as a mixin myself, and it's designed to be used as such. I'd advise listing the VersionAdmin first in the inheritance list, however, or use the RevisionMiddleware in your MIDDLEWARE_CLASSES setting. This will ensure that all the admin actions are wrapped in a revision.