Reputation: 422
Currently I am learning Django framework, I've decided to get familiar with it by making a simple Blog app, but I've problem with navigation bar, I'm trying to make a responsive navbar, with collapse classes etc. I've searched about this problem in this forum, but nothing helped, so I need personal help if possible. That's my code, please note that I did include bootstrap and bootstrap's javascript plugin. Thanks in advance. How this navbar works: http://scr.hu/28mo/ncxtp
<div class="navbar-wrapper">
<nav class="navbar navbar-inverse navbar-static-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar" aria-expanded="false" aria-controls="navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">MyBlogName</a>
</div>
<div class="collapse navbar-collapse" id ="navbar">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">Page 1</a></li>
<li><a href="#">Page 2</a></li>
<li><a href="#">Page 3</a></li>
</ul>
</div>
</div>
</nav>
</div>
Upvotes: 0
Views: 1237
Reputation: 3959
Collapse needs some Javascript to work properly. You should add it to your template. Quick and dirty with script tags in your posted template. Later read about staticfiles and how to ship them with your app. There is also a quite useful example here: Include CSS and Javascript in my django template
Upvotes: 1