Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when subclassing subclass of CMSPlugin #265

Closed
samluescher opened this issue Nov 23, 2009 · 6 comments
Closed

Exception when subclassing subclass of CMSPlugin #265

samluescher opened this issue Nov 23, 2009 · 6 comments

Comments

@samluescher
Copy link
Contributor

When creating a plugin model that is based on an existing plugin model, for instance: class SpecialText(Text):

Caught an exception while rendering: plugin model needs to subclass CMSPlugin

@tehfink
Copy link
Contributor

tehfink commented Dec 8, 2009

what happens if you try:

 class SpecialText(Text, CMSPlugin):

i had the same problem making a faq plugin. i had to copy a lot of stuff, but i was able to keep it somewhat manageable by using a lot of import statements:
http://bitbucket.org/tehfink/cmsplugin-faq/

@digi604
Copy link
Contributor

digi604 commented Jan 5, 2010

did the trick from thefink work? Should this go into the docs?

@digi604
Copy link
Contributor

digi604 commented Jan 6, 2010

ok this does not work as you get an other one2one relation to text.
what we could do: Make an AbstractText and a Text Class. So people could inherit from AbstractText.

@digi604
Copy link
Contributor

digi604 commented Jan 6, 2010

inheritance from abstract models should now work. Inheritance of non abstract models... well that's a very hard problem. Reversion and performance are some of the issues.
So for now we leave it with abstract models.

@digi604
Copy link
Contributor

digi604 commented Jan 6, 2010

closed by 0697465 abstract text plugin model. Allow abstract plugin models to be inherited

@samluescher
Copy link
Contributor Author

Sorry I had to put this off for such a long time – I confirm that subclassing AbstractText works as expected.

christianbertschy pushed a commit to christianbertschy/django-cms-2.0 that referenced this issue Oct 1, 2012
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants