如何在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)
菜单上没有显示任何内容。
答案 0 :(得分:-1)
{'app': 'flatpages', 'label': 'Pages'},