出于某种原因,我似乎无法添加子插件:
我想实现以下层次结构:
然而,当我按下列的加号时没有任何反应,我无法在常见问题列中拖动常见问题插件。有什么想法吗?
我的插件定义:
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from django.utils.translation import ugettext_lazy as _
from .models import FaqPluginModel
class FaqRowPlugin(CMSPluginBase):
name = u'Faq Row'
module = _("Fundbox")
render_template = "faq_row.html"
cache = False
allow_children = True
class FaqColumnPlugin(CMSPluginBase):
name = u'Faq Column'
module = _("Fundbox")
render_template = "faq_column.html"
cache = False
allow_children = True
require_parent = True
class FaqPlugin(CMSPluginBase):
name = u'Faq'
module = _("Fundbox")
model = FaqPluginModel
render_template = "faq.html"
cache = False
plugin_pool.register_plugin(FaqRowPlugin) # register the plugin
plugin_pool.register_plugin(FaqColumnPlugin) # register the plugin
plugin_pool.register_plugin(FaqPlugin) # register the plugin