Django CMS无法将子项添加到嵌套插件中

时间:2017-04-26 02:11:41

标签: django django-cms

出于某种原因,我似乎无法添加子插件:

enter image description here

我想实现以下层次结构:

  • 常见问题排
    • Faq专栏
      • 常见问题

然而,当我按下列的加号时没有任何反应,我无法在常见问题列中拖动常见问题插件。有什么想法吗?

我的插件定义:

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

0 个答案:

没有答案