Developer 2024 🎇限时优惠进行中,现在购买立即享受

现在购买

setting.py自定权限不生效,请指教

avatar66349D9B
1月3日391次阅读

按照链接操作自定义菜单权限没有生效,帮忙看看什么问题 https://www.mldoo.com/docs/simplepro/config/permissions.html 另外“自定义菜单如果是最顶级,需要在内容类型->内容类型菜单中添加一条数据。”这句话什么意思?

setting.py中添加下面内容 ` 'menus': [{ 'name': 'Simpleui', 'icon': 'fas fa-code', 'url': 'https://www.mldoo.com/docs/simplepro/config/permissions.html#%E8%87%AA%E5%AE%9A%E4%B9%89%E8%8F%9C%E5%8D%95%E6%9D%83%E9%99%90', 'codename': 'simpleui' }, { 'name': '测试', 'icon': 'fa fa-file', 'codename': 'test', 'models': [{ 'name': 'Baidu', 'url': 'http://baidu.com', 'icon': 'far fa-surprise', 'codename': 'baidu' }, { 'name': '内网穿透', 'url': 'https://www.wezoz.com', 'icon': 'fab fa-github', 'codename': 'nat' }, { 'name': '内网穿透', 'url': 'https://www.wezoz.com', 'icon': 'fab fa-github' }, { 'name': '登录页嵌套测试', 'url': '/login' }] }],```

然后执行命令 python3 manage.py migrate_menu 表auth_permission,django_content_type ,auth_group 中并没有自动生成对应的数据。 权限控制也没有,请问什么原因呢?

发布评论
登录后发表内容
0个评论