Closed creimers closed 9 years ago
Please try again without django-reversion.
You mean pip uninstall django-reversion
?
no, you just have to remove it from INSTALLED_APPS
.
Note that cmsplugin_cascade.models.BootstrapContainerPluginModel
is a proxy model, generated on the fly. Therefore please refer to the docs in django-reversion about how to handle these kinds of models.
Commenting out django reversion does the trick. But then, there's no reversion of course.
There is a long thread on github about reversion and proxy models concluding that proxy model support has been merged into master: https://github.com/etianen/django-reversion/issues/134
I still have to get to the bottom of this...
Hi @jrief, great work with djangocms-cascade - I'm a big fan of this project.
I'm just wondering if there are any plans to support django-reversion in the near future?
Thanks
Any volunteer who wants to do this work?
Well this appears to resolve the issue by registering the proxy model just after creation:
diff --git a/cmsplugin_cascade/plugin_base.py b/cmsplugin_cascade/plugin_base.py
index 45616ea..6400cee 100755
--- a/cmsplugin_cascade/plugin_base.py
+++ b/cmsplugin_cascade/plugin_base.py
@@ -12,6 +12,7 @@ from .sharable.forms import SharableGlossaryMixin
from .extra_fields.mixins import ExtraFieldsMixin
from .widgets import JSONMultiWidget
from . import settings
+import reversion
class CascadePluginBaseMetaclass(CMSPluginBaseMetaclass):
@@ -37,6 +38,7 @@ class CascadePluginBaseMetaclass(CMSPluginBaseMetaclass):
base_model = CascadeElement
model_mixins = attrs.pop('model_mixins', ())
attrs['model'] = CascadePluginBaseMetaclass.create_model(name, model_mixins, base_model)
+ reversion.register(attrs['model'])
return super(CascadePluginBaseMetaclass, cls).__new__(cls, name, bases, attrs)
Is this just that simple - you only have to register the model? Oh my god, if I would have known this earlier, I would have implemented it myself. Many thanks for this PR! Do you think it will work with Django-1.6 as well?
I don't quite know what to make of this...
I have installed
In my
settings.py
:Upon publishing a page containing cascade plugins, I get this error message:
What am I missing?