django - 无法将面板添加到 openstack django Horizon
问题描述
我尝试添加面板 openstack 计算面板组,但它不起作用我手动执行 python 包,因为脚趾在这里不起作用是我的面板树在此处 输入图像描述 panel.py
from django.utils.translation import ugettext_lazy as _
import horizon
from openstack_dashboard.dashboards.project import dashboard
class Testpanel(horizon.Panel):
name = _("Testpanel")
slug = "mypanel.testpanel"
permissions = ('openstack.project.compute', 'openstack.roles.admin')
policy_rules = ((("compute", "context_is_admin"),
("compute", "compute:get_all")),)
dashboard.Project.register(Testpanel)
_12221_project_mypanel_test_panel.py
from django.utils.translation import ugettext_lazy as _
import horizon
from openstack_dashboard.dashboards.project import dashboard
class Testpanel(horizon.Panel):
name = _("Testpanel")
slug = "mypanel.testpanel"
permissions = ('openstack.project.compute', 'openstack.roles.admin')
policy_rules = ((("compute", "context_is_admin"),
("compute", "compute:get_all")),)
dashboard.Project.register(Testpanel)
我在计算面板组/项目仪表板上看不到 mypanel
我想念什么??我只想在仪表板上看到我的面板名称
解决方案
推荐阅读
- wordpress - 如何删除搜索结果页面
- asp.net-mvc - .NET MVC Razor View:有条件地包括 razor 命令
- c# - C# Entity Framework Json 反序列化字符串数组问题
- python - 如何使用python制作警报系统
- docker - Azure Pipelines 中的变量如何直接在 Container 的 NodeJS 代码中使用?
- java - 在 JFreeChart 中,什么是缠绕规则?
- java - 错误:无法找到或加载主类 com.sun.tools.internal.xjc.Driver
- python - 读取多个 csv 文件并将内容存储为不同名称引用的列表
- angular - 如何在嵌套的 formGroups 中返回字段验证错误?
- php - GET POST 或两个单独的文件来处理请求