标签:name detail 传递 home bsp 问答 end ret mil
1. 在首页添加显示问答的列表,并定义好相应的样式。
无序列表
<ul >
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
<p>{{ user }}context</p> <ul class="box"> <li class="list-group-item"> <span class="glyphicon glyphicon-leaf" aria-hidden="true"></span> <a href="#">username</a> <br> <a href="#">question</a> <p>questionDetail{{ question }}</p> </li> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ul>
2. 用字典向index.html传递参数。
def homepage(): context = { ‘question‘: ‘question2017‘, } return render_template("homepage.html",**context)
标签:name detail 传递 home bsp 问答 end ret mil
原文地址:http://www.cnblogs.com/JaTae/p/7941267.html