Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
启用grappelli后,django adminplus链接将消失_Django_Django Admin_Django Grappelli - Fatal编程技术网

启用grappelli后,django adminplus链接将消失

启用grappelli后,django adminplus链接将消失,django,django-admin,django-grappelli,Django,Django Admin,Django Grappelli,最近,我添加了adminplus,它会自动在管理员页面上创建一个指向我的自定义视图的链接。例如,admin.site.register_view('somepath','My Fancy admin view!',view=My_view)应该生成一个“自定义视图”菜单,其中包含一个名为“My Fancy admin view!”的链接。如果禁用Grappelli,则会显示菜单和链接,但启用Grappelli后,菜单和链接将消失。我猜我跳过了这个菜单,因为它的定义与其他菜单不同。任何建议都将不胜

最近,我添加了adminplus,它会自动在管理员页面上创建一个指向我的自定义视图的链接。例如,
admin.site.register_view('somepath','My Fancy admin view!',view=My_view)
应该生成一个“自定义视图”菜单,其中包含一个名为“My Fancy admin view!”的链接。如果禁用Grappelli,则会显示菜单和链接,但启用Grappelli后,菜单和链接将消失。我猜我跳过了这个菜单,因为它的定义与其他菜单不同。任何建议都将不胜感激。

感谢dan klasson提供的提示,我找到了解决问题的方法

将以下代码添加到Grapelli的
admin/index.html

        {% empty %}
            <p>{% trans "You don´t have permission to edit anything." %}</p>
        {% endfor %}
<!-- Code above is included as point of reference -->
<!-- Add the code below -->
<div class="grp-module" id="custom_views">
    <h2>Custom Views</h2>       
    <div class="grp-row">
        {% for path, name in custom_list %}   
        <a href="{{ path }}"><strong>{{ name }}</strong></a>
        {% endfor %}    
    </div>
</div>  
{%empty%}
{%trans“您没有编辑任何内容的权限。”%}

{%endfor%} 自定义视图 {%用于路径,名称在自定义_列表%} {%endfor%}
尝试在
已安装的应用程序中交换两个应用程序的顺序。您还可以覆盖Grapelli的
admin/index.html
以包含admin plus'
admin/index.html
的内容。我尝试过交换这两个应用程序的顺序,但都没有成功。我们来看看admin/index.html。谢谢