标签:img app 制作 传递参数 blog 列表 use pre image
1. 在首页添加显示问答的列表,并定义好相应的样式。
无序列表
<ul >
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
<div id="list-container"> <ul> <li class="list-group-item"> <span class="glyphicon glyphicon-leaf" aria-hidden="true"></span> 帐号:<a href="#" target="_blank">{{ username }}</a> <br> <a href="#">{{ title }}</a> <span class="badge">creat_time</span> <p style="...">{{ questions }}</p> </li> </ul> </div>
2. 用字典向index.html传递参数。
@app.route(‘/index/‘) def index(): context={ ‘questions‘:‘wowwowwow‘ } return render_template(‘index.html‘,**context)
标签:img app 制作 传递参数 blog 列表 use pre image
原文地址:http://www.cnblogs.com/zsy-97/p/7941278.html