-
-
Notifications
You must be signed in to change notification settings - Fork 302
Open
Labels
Description
I modified the example pexp/admin.py. According to the documentation, connect to Django- reversion. I added data in admin to "ModelC". When I go into the history of a way to view and choose the right time, I can only see a Field1. But it's not possible to see Field2, Field3! This is normal? Whose mistake?
Made the following changes:
--- example/pexp/admin.py.orig 2015-04-30 12:40:14.000000000 +0300
+++ example/pexp/admin.py 2015-05-07 19:23:12.000000000 +0300
@@ -4,2 +4,4 @@
+import reversion
+from reversion import VersionAdmin
@@ -32,3 +34,9 @@
-class ModelAAdmin(PolymorphicParentModelAdmin):
+class ModelBAdmin(VersionAdmin, ModelAChildAdmin):
+ pass
+
+class ModelCAdmin(ModelBAdmin):
+ pass
+
+class ModelAAdmin(VersionAdmin,PolymorphicParentModelAdmin):
base_model = ModelA
@@ -37,6 +45,8 @@
(ModelA, ModelAChildAdmin),
- (ModelB, ModelAChildAdmin),
- (ModelC, ModelAChildAdmin),
+ (ModelB, ModelBAdmin),
+ (ModelC, ModelCAdmin),
)
+reversion.register(ModelB, follow=['modela_ptr'])
+reversion.register(ModelC, follow=['modelb_ptr'])
admin.site.register(ModelA, ModelAAdmin)