如何在django西装菜单中添加flatpages

时间:2014-12-16 16:33:31

标签: django django-flatpages

如何在django套装菜单中添加flatpages应用程序?我尝试了以下配置。

来自settings.py

'MENU': (
    {'app': 'dongledb', 'label': 'Dongles', 'icon': 'icon-fire'},
    {'app': 'projapp', 'label': 'Manage', 'icon': 'icon-edit'},
    {'app': 'ruleskb', 'label': 'Rulesets', 'icon': 'icon-road'},
    {'app': 'userprofile', 'label': 'User Profile', 'icon': 'icon-user'},
    {'app': 'report_builder', 'label': 'Report Builder', 'icon': 'icon-filter'},
    {'label': 'Executive Dashboard', 'icon': 'icon-filter', 'url': '/execdash/xls'},
    {'app': 'chronograph', 'label': 'Scheduled Jobs', 'icon': 'icon-time'},
    {'app': 'currencies', 'label': 'Currencies', 'icon': 'icon-fire'},
    {'app': 'cities_light', 'label': 'Country/Region/Cities', 'icon': 'icon-plane'},
    {'app': 'aws_manager', 'label': 'AWS Cloud', 'icon': 'icon-fire'},
    'sites',
    'flatpages',

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'suit',
    'suit_ckeditor',
    # enable the admin:
    'django.contrib.admin',
    'django.contrib.sites',
    'django.contrib.flatpages',

来自admin.py

from django.contrib.flatpages.models import FlatPage

# We have to unregister the normal admin, and then reregister ours
admin.site.unregister(FlatPage)
admin.site.register(FlatPage)

菜单上没有显示任何内容。

1 个答案:

答案 0 :(得分:-1)

{'app': 'flatpages', 'label': 'Pages'},