无法找到其高级设置,“应用程序”菜单中的“轮询应用程序”,同时遵循官方Django CMS tut

时间:2016-07-03 12:12:39

标签: django django-cms

from cms.app_base import CMSApp
from cms.apphook_pool import apphook_pool
from django.utils.translation import ugettext_lazy as _

#My cms_apps.py looks like this
class PollsApphook(CMSApp):
    app_name = "polls"
    name = _("Polls Application")

    def get_urls(self, page=None, language=None, **kwargs):
        return ["polls.urls"]


apphook_pool.register(PollsApphook)  # register the application

现在,当我查看Looks this way no "Polls Application" option in drop down

下的高级设置时

1 个答案:

答案 0 :(得分:1)

我也有这个问题,你应该先检查你使用的Django CMS版本。教程版本是稳定版本,但我猜你使用3.2.X或其他东西。取代def get_url行,你应该让这个类看起来像这样

class PollsApphook(CMSApp):
    app_name = "polls"
    name = _("Polls Application")
    urls = ["polls.urls"]