制作首页的显示列表

 1 <div class="row clearfix">
 2         <div class="col-md-4 column">
 3             <div class="jumbotron well">
 4                 <h1>
 5                     Hello, world!
 6                 </h1>
 7                 <p>
 8                     This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.
 9                 </p>
10                 <p>
11                      <a class="btn btn-primary btn-large" href="#">Learn more</a>
12                 </p>
13             </div>
14         </div>
15         <div class="col-md-8 column" style="background: whitesmoke">
16              <p style="color: #FFFFFF">`{{ user }}context</p>
17                 <ul>
18                     <li>
19                         <a href="#">{{ user }}</a>
20                         <a href="#">{{ title }}</a>
21                         <br>
22                         <p>{{ detail }}</p>
23                         <span>发布时间  longtime ago</span>
24                         <span>评论数 100000++++</span>
25                     </li>
26                 </ul>
27         </div>
28     </div>
29 </div>
 1 @app.route('/')
 2 def index():
 3     context = {
 4         'user':'小学生',
 5         'title':'哈哈哈哈哈哈哈哈哈',
 6         'detail':'啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊'
 7 
 8 
 9     }
10 
11     return render_template("index.html",**context)
12 复制代码

 

posted @ 2017-11-30 21:41  017廖佳辉  阅读(112)  评论(0编辑  收藏  举报