12 2017 档案
摘要:1.更新User对象,设置对内的_password 2.编写对外的password 3.密码验证方法: 4.登录验证:
阅读全文
摘要:1.个人中心—视图函数带标签页面参数tag@app.route('/usercenter/<user_id>/<tag>')def usercenter(user_id, tag): if tag == ‘1': return render_template('usercenter1.html',
阅读全文
摘要:1.新页面user.html,用<ul ><li role="presentation"> 实现标签页导航。 2.user.html继承base.html。重写title,head,main块.将上述<ul>放在main块中.定义新的块user。 3.让上次作业完成的个人中心页面,继承user.ht
阅读全文
摘要:1.个人中心的页面布局(html文件及相应的样式文件) 2.定义视图函数def usercenter(user_id): 3.向前端页面传递参数 4.页面显示相应数据 发布的全部问答 发布的全部评论 个人信息 5.各个页面链接到个人中心
阅读全文
摘要:1、定义评论的视图函数 @app.route('/comment/',methods=['POST']) def comment(): 读取前端页面数据,保存到数据库中 app.route('/comment/',methods=['POST']) @loginFirst def comment(): comment = request.for...
阅读全文
摘要:首页 {% block logintitle %}{% endblock %} {% block registertitle %}{% endblock %} 首页 {% if username %} {{ username...
阅读全文
摘要:首页 {% block logintitle %}{% endblock %} {% block registertitle %}{% endblock %} 首页 {% if username %} {{ usernam...
阅读全文

浙公网安备 33010602011771号