1👍
✅
First you have to find where base.html
resides. I think PyCharm should show you the path to each opened file. Then,in the base.html
file, to add more buttons you simply remove the comment
and endcomment
template tags inside nav
block and add more li
items in the ul
{% block nav %}
<ul class="nav navbar-nav">
<li><a href="#tab_one">One</a></li>
<li><a href="#tab_two">Two</a></li>
<li><a href="#tab_three">Three</a></li> # added
<li><a href="#tab_four">Four</a></li> # added
</ul>
{% endblock %}
EDIT
If, for any reasons, you don’t want to edit the base.html
file, then you can add in your mysite/templates/site_base.html
file a nav
block with the ul
and the links you want. Basically you can add
{% block nav %}
<ul class="nav navbar-nav">
<li><a href="#tab_one">One</a></li>
<li><a href="#tab_two">Two</a></li>
<li><a href="#tab_three">Three</a></li> # added
<li><a href="#tab_four">Four</a></li> # added
</ul>
{% endblock %}
inside the site_base.html
, in the right place, and this will override the same block from base.html
.
👤doru
Source:stackexchange.com