How to add a link from index.html page through change_list page of any models

Hi

I want to add a link to the change_list page of any models.

I try to do simply on layout.html ,
the below is the menu part in html.
it did’t work

  • Additional Costs
  • but it workedf for admin page

  • Manage All Admin
  • <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    <li><a href="{% url 'home' %}">Home</a></li>
                    <li><a href="{% url 'admin:index' %}">Manage All Admin</a></li>
                    <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#">Manage Cost
                            <span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><a href="{% url 'admin:masteradditionalcost_changelist' %}">Additional Costs</a></li>
                             <li><a href="#">Fixed Costs</a></li>
                             <li><a href="#">Master Costs</a></li>
                        </ul>
                    </li>
                    <li><a href="{% url 'list_error' %}">Error</a></li>
    {#                <li><a href="{% url 'list_transaction' %}">Transaction</a></li>#}
    
                </ul>
                {% include 'app/loginpartial.html' %}
            </div>
    
    
    
    

    but error occurred like this.

    I supposed I lacked some essential procedures to refer URL in the admin.
    maybe in url.py or load something first in layout,html

    How to add link admin?

    Ponthorn

    From what I can gather from a relatively quick glance at the admin source code, it appears that the urls are formatted as appname_modelname_changelist. I’d suggest you try
    {% url 'admin:app_masteradditionalcost_changelist' %}

    1 Like