标签:text group onclick ace 发送 class tail 布局 author
@app.route(‘/shouye/‘) def shouye(): context = { ‘questions‘:Question.query.order_by(‘create_time‘).all() } return render_template(‘hh.html‘,**context)
{% extends ‘base.html‘ %} {% block title %} 首页 {% endblock %} {% block main %} <link rel="stylesheet" type="text/css" href="../static/css/hh.css"> <p>{{ username }}***</p> <div class="box"> <ul class="list-group"> {% for foo in questions %} <li class="list-group-item"> <img style="width: 30px" src="{{ url_for(‘static‘,filename=‘css/touxiang.jpg‘) }}" alt="64"> <a href="#"style="color: red">{{ username }}</a><br> <a href="#"style="color: red">问题:{{ foo.title }}</a><br> <p style="align-content: center">{{ foo.detail }}</p> <span class="badge" style="margin-left: 60%">{{ foo.create_time }}</span> <p style="margin-left: 25%"></p><br> </li> {% endfor %} </ul> </div> {% endblock %}
{% extends ‘base.html‘ %} {% block title %} 问答详情 {% endblock %} {% block main %} <div class="box"> <h3>Title{{ ques }} <br><small>author r</small></h3><hr> <p>detail</p> <hr> <form action="{{ url_for(‘detail‘) }}" method="post"> <div><textarea class="form-control" id="new_comment" rows="3" style="margin-left: 1%" name="new_comment" placeholder="write your comment"></textarea><br></div> <button type="submit" onclick="foLogin()">发送</button> </form> <ul class="list-group" style="margin: 10px"></ul> </div> {% endblock %}
@app.route(‘/detail/‘) def detail(): return render_template(‘detail.html‘)
标签:text group onclick ace 发送 class tail 布局 author
原文地址:http://www.cnblogs.com/00js/p/7992843.html