@app.route('/')
def shouye():
context={
'question':Question.query.all()
}
return render_template('shouye.html',**context)
</nav>
{% block main %} <p>{{ username }}xyjie</p>
{% endblock %}
<link rel="stylesheet" type="text/css" href="xyjie.css">
<link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
</head>
<body id="mybody">
<nav class="navbar navbar-inverse" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">首页</a>
</div>
<div>
{% extends 'base.html' %}
{% block title %}问答{% endblock %}
{% block head %}
<link type="text/css" rel="stylesheet" href="{{ url_for('static',filename='css/label.css') }}">
<script src="{{ url_for('static',filename='js/label.js') }}"></script>
{% endblock %}
{% block main %}
<div class="label">
<h1 style="color:pink",align="center"> 发布问答</h1>
<div class="q">
<label for="question">问题</label>
<textarea id="question" cols="50" rows="1"></textarea>
</div>
<div class="form-group">
<label for="questionDetail">内容</label>
<textarea class="form-control" id="questionDetail" cols="50" rows="5"></textarea>
</div>
<br>
<div class="input-area">
<button onclick="fnQuestion">发布问答</button>
</div>
</div>
{% endblock %}