代码拉取完成,页面将自动刷新
# encoding: utf-8
from suit.apps import DjangoSuitConfig
from suit.menu import ParentItem, ChildItem
class SuitConfig(DjangoSuitConfig):
layout = 'vertical'
menu = (
ParentItem(u'主机管理', children=[
ChildItem(model='core.host'),
ChildItem(model='core.trafficlog'),
ChildItem(model='core.trafficchart'),
]),
ParentItem(u'权限管理', permissions='core.view_staff', children=[
ChildItem(model='core.staff'),
ChildItem(model='core.department'),
]),
# ParentItem(u'账号', children=[
# ChildItem(u'用户', model='auth.user'),
# ChildItem(u'部门', 'auth.group'),
# ChildItem(u'定制', url='/admin/custom/'),
# ]),
# ParentItem(u'右侧菜单', children=[
# ChildItem(u'修改密码', url='admin:password_change'),
# ChildItem(u'主页', url='http://yjidc.com', target_blank=True),
# ], align_right=True),
)
def ready(self):
super(SuitConfig, self).ready()
# DO NOT COPY FOLLOWING LINE
# It is only to prevent updating last_login in DB for demo app
self.prevent_user_last_login()
def prevent_user_last_login(self):
"""
Disconnect last login signal
"""
from django.contrib.auth import user_logged_in
from django.contrib.auth.models import update_last_login
user_logged_in.disconnect(update_last_login)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。