老师,请问怎么调整 xadmin的菜单摆放顺序?
来源:13-8 excel导入插件介绍
素珍呐你就是个长虫
2018-03-14
老师,请问怎么调整 xadmin的菜单摆放顺序?
写回答
1回答
-
bobby
2018-03-16
class GlobalSetting(object): site_title = 'xxx' site_footer = 'imooc.com' global_search_models = [UserProfile,] menu_style = 'accordion' def get_site_menu(self): return ( {'title': '用户模块', 'menus':( {'title':'用户','url': self.get_model_url(UserProfile, 'changelist')}, {'title': '组', 'url': self.get_model_url(Group, 'changelist')}, {'title':'权限','url': self.get_model_url(Permission, 'changelist')}, )}, {'title': '用户中心', 'menus':( {'title':'积分获取详情','url': self.get_model_url(PointsGainDetail, 'changelist')}, {'title':'积分消费详情','url': self.get_model_url(PointsCostDetail, 'changelist')}, {'title':'用户积分','url': self.get_model_url(MyPoints, 'changelist')}, {'title':'用户收藏','url': self.get_model_url(MyFavorite, 'changelist')}, {'title':'房屋信息','url': self.get_model_url(HouseInfo, 'changelist')}, {'title':'用户申诉','url': self.get_model_url(MyAppeal, 'changelist')}, )}, ) xadmin.site.register(views.CommAdminView, GlobalSetting)
00
相似问题