【问题标题】:Is it possible to NOT display the application name in a Grappelli-Dashboard module.AppList?是否可以不在 Grappelli-Dashboard module.AppList 中显示应用程序名称?
【发布时间】:2014-12-10 21:55:02
【问题描述】:

我正在为我的 Django 管理站点使用 Grappelli-Dashboard。我想自定义应用程序标题的显示,以便不显示应用程序的名称。那可能吗?如果是这样,怎么做?我想不通……? 鉴于下面的代码,我不希望显示两个应用程序的名称(即我不希望管理员显示“事物”的标题和“项目”的标题)

        self.children.append(modules.Group(
        _('MyStuff'),
        column=3,
        collapsible=True,
        children = [
            modules.AppList(
                _('Stuff Details'),
                column=1,
                collapsible=True,
                models=('things.models', ),
            ),
            modules.AppList(
                _('Stuff Data'),
                column=1,
                collapsible=True,
                models=('items.models.*', ),
            ),

        ]
    ))

【问题讨论】:

    标签: django django-admin django-grappelli


    【解决方案1】:

    您需要覆盖生成管理界面的模板文件。找到gratelli仪表板模块的安装位置,查看其模板目录,找到您要更改的模板html文件。将该模板文件复制到您自己应用的模板目录中(确保它在“模板”中具有相同的路径结构)并编辑您的副本以删除应用名称。

    【讨论】:

      猜你喜欢
      • 2021-12-23
      • 1970-01-01
      • 1970-01-01
      • 2017-01-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-10-12
      相关资源
      最近更新 更多