django adminplus link disappears when grappelli is enabled

470 Views Asked by At

Recently, I added adminplus which automatically creates a link on the admin page to my custom view. E.g. admin.site.register_view('somepath', 'My Fancy Admin View!', view=my_view) should produce a 'Custom View' menu with a link named 'My Fancy Admin View!'. If I disable Grappelli, the menu & link appears, however when Grappelli is enabled, the menu & link disappears. My guess is Grappelli skips this menu because it is defined differently from the rest. Any advice would be greatly appreciated.

1

There are 1 best solutions below

0
On

Thank to the hint provided by dan-klasson, I found a hack for my problem

Add the following code to Grappelli's 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>