12 2017 档案

摘要:1.更新User对象,设置对内的_password 2.编写对外的password 3.密码验证方法: 4.登录验证: 阅读全文
posted @ 2017-12-22 21:09 会搓火球的单身狗 阅读(136) 评论(0) 推荐(0)
摘要:3.完成视图函数search() 阅读全文
posted @ 2017-12-19 11:57 会搓火球的单身狗 阅读(136) 评论(0) 推荐(0)
摘要:1.个人中心—视图函数带标签页面参数tag@app.route('/usercenter/<user_id>/<tag>')def usercenter(user_id, tag): if tag == ‘1': return render_template('usercenter1.html', 阅读全文
posted @ 2017-12-15 17:33 会搓火球的单身狗 阅读(118) 评论(0) 推荐(0)
摘要:1.新页面user.html,用<ul ><li role="presentation"> 实现标签页导航。 2.user.html继承base.html。重写title,head,main块.将上述<ul>放在main块中.定义新的块user。 3.让上次作业完成的个人中心页面,继承user.ht 阅读全文
posted @ 2017-12-14 13:46 会搓火球的单身狗 阅读(276) 评论(0) 推荐(0)
摘要:1.个人中心的页面布局(html文件及相应的样式文件) 2.定义视图函数def usercenter(user_id): 3.向前端页面传递参数 4.页面显示相应数据 发布的全部问答 发布的全部评论 个人信息 5.各个页面链接到个人中心 阅读全文
posted @ 2017-12-13 20:45 会搓火球的单身狗 阅读(217) 评论(0) 推荐(0)
摘要:1、定义评论的视图函数 @app.route('/comment/',methods=['POST']) def comment(): 读取前端页面数据,保存到数据库中 app.route('/comment/',methods=['POST']) @loginFirst def comment(): comment = request.for... 阅读全文
posted @ 2017-12-08 21:43 会搓火球的单身狗 阅读(149) 评论(0) 推荐(0)
摘要:首页 {% block logintitle %}{% endblock %} {% block registertitle %}{% endblock %} 首页 {% if username %} {{ username... 阅读全文
posted @ 2017-12-06 18:27 会搓火球的单身狗 阅读(113) 评论(0) 推荐(0)
摘要:首页 {% block logintitle %}{% endblock %} {% block registertitle %}{% endblock %} 首页 {% if username %} {{ usernam... 阅读全文
posted @ 2017-12-01 11:19 会搓火球的单身狗 阅读(130) 评论(0) 推荐(0)