Django-cms: CMS_PLACEHOLDER_CONF doesn't limit the child plugins...

Created on 30 Jan 2018  路  3Comments  路  Source: django-cms/django-cms

e.g.:

CMS_PLACEHOLDER_CONF = {
    "content": {
        "name": _("Content"),
        "plugins": ["FooPlugin"],
    },
}

#...

class FooPlugin(CMSPluginBase):
    allow_children = True
    child_classes = ["BarPlugin"]

The user can only add FooPlugin to the "content" placeholder. That's ok.
But after adding FooPlugin, he can add the BarPlugin as FooPlugin child ...

I expected that adding the child would not work and the plugin list doesn't contain the BarPlugin because it's not in the CMS_PLACEHOLDER_CONF["content"]["plugins"]

Is this a bug or "by design" ?

If this is "by design" than a note should be added to the docs [1], isn't it?

[1] http://docs.django-cms.org/en/latest/reference/configuration.html#cms-placeholder-conf

frontend bug accepted

All 3 comments

This is a bug.
The list in "plugins" applies to all plugins, regardless of tree position.
Which cms version are you using?

Ah ok. Thanks for the feedback!

  • django-cms v3.4.5
  • Django v1.11.9
  • Python v3.5.2

A bug? It's exactly the behaviour I want :(

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sbywater picture sbywater  路  3Comments

evildmp picture evildmp  路  5Comments

quiqueporta picture quiqueporta  路  8Comments

SteinRobert picture SteinRobert  路  3Comments

aarcro picture aarcro  路  7Comments