[英]Django Heroku - Dropdown not working in bootstrap
I made a Django project and a page has side menu, whenever the side menu is selected a dropdown appears. 我创建了一个Django项目,并且页面具有侧边菜单,每当选择侧边菜单时,就会出现一个下拉菜单。 This is happening when I run it locally, whereas its not working from heroku. 当我在本地运行它时会发生这种情况,而在heroku中却无法运行。 The dropdown code is as follows: 下拉代码如下:
<li class="panel panel-default" id="dropdown">
<a data-toggle="collapse" href="#dropdown-lvl4">
<span class="glyphicon glyphicon-menu-down"></span> Day 4 <span class="caret"></span>
</a>
<!-- Dropdown level 1 -->
<div id="dropdown-lvl4" class="panel-collapse collapse">
<div class="panel-body">
<ul class="nav navbar-nav">
<li><a href="/python_course/day4/reg_expressions">Regular Expressions</a></li>
<li><a href="/python_course/day4/data_scraping">Data Scraping</a></li>
</ul>
</div>
</div>
</li>
The website link is here . 网站链接在这里 。 Kindly help me with this. 请帮助我。 I an new to heroku and Django. 我是heroku和Django的新手。
You are trying to load an unencrypted ( http
) resource from a secure ( https
) page. 您试图从安全( https
)页面加载未加密( http
)资源。 You will notice that if you check your page using http
it will work. 您会注意到,如果您使用http
检查您的页面,它将起作用。
Change the following line 更改以下行
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
to 至
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
Note the lack of protocol string ( http:
) in the URL. 请注意,URL中缺少协议字符串( http:
:)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.