• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






李明惠

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

12 2017 档案

 
密码保护
摘要:1.更新User对象,设置对内的_password class User(db.Model): __tablename__ = 'user' _password = db.Column(db.String(200), nullable=False) #内部使用 2.编写对外的password fro 阅读全文
posted @ 2017-12-22 14:24 李明惠 阅读(354) 评论(0) 推荐(0)
实现搜索功能
摘要:首页,所有问答 搜素标题,所出现的 搜索‘hi’,出现两条结果,其中包括了标题跟内容 示例: Lobby.query.filter( or_( and_( Lobby.id == Team.lobby_id, LobbyPlayer.team_id == Team.id, LobbyPlayer.p 阅读全文
posted @ 2017-12-19 09:50 李明惠 阅读(1042) 评论(0) 推荐(0)
完成个人中心—导航标签
摘要:个人中心—视图函数带标签页面参数tag@app.route('/usercenter//')def usercenter(user_id, tag): if tag == ‘1': return render_template('usercenter1.html', **context) # 个人中心 @app.route('/usercenter//') @loginFris... 阅读全文
posted @ 2017-12-15 11:07 李明惠 阅读(286) 评论(0) 推荐(0)
个人中心标签页导航
摘要:usercenter2 阅读全文
posted @ 2017-12-13 21:18 李明惠 阅读(231) 评论(0) 推荐(0)
评论列表显示及排序,个人中心显示
摘要:1.个人中心的页面布局(html文件及相应的样式文件) 2.定义视图函数def usercenter(user_id): 3.向前端页面传递参数 4.页面显示相应数据 发布的全部问答 发布的全部评论 个人信息 5.各个页面链接到个人中心 阅读全文
posted @ 2017-12-13 20:36 李明惠 阅读(347) 评论(0) 推荐(0)
完成评论功能
摘要:定义评论的视图函数@app.route('/comment/',methods=['POST'])def comment():读取前端页面数据,保存到数据库中 @app.route('/comment/',methods=['POST']) @loginFrist def comment(): comment = request.form.get('new_comment') ... 阅读全文
posted @ 2017-12-08 13:24 李明惠 阅读(213) 评论(0) 推荐(0)
从首页问答标题到问答详情页
摘要:建立评论的对象关系映射: class Comment(db.Model): __tablename__='comment' 尝试实现发布评论。 不成功 阅读全文
posted @ 2017-12-05 13:02 李明惠 阅读(226) 评论(0) 推荐(0)
首页列表显示全部问答,完成问答详情页布局。
摘要:主python文件 前端页面显示列表html CSS 阅读全文
posted @ 2017-12-01 13:57 李明惠 阅读(408) 评论(0) 推荐(0)