12 2017 档案
摘要:1.更新User对象,设置对内的_password class User(db.Model): __tablename__ = 'user' _password = db.Column(db.String(200), nullable=False) #内部使用 2.编写对外的password fro
阅读全文
摘要:示例: Lobby.query.filter( or_( and_( Lobby.id == Team.lobby_id, LobbyPlayer.team_id == Team.id, LobbyPlayer.player_id == player.steamid ), and_( Lobby.i
阅读全文
摘要:个人中心—视图函数带标签页面参数tag@app.route('/usercenter/<user_id>/<tag>')def usercenter(user_id, tag): if tag == ‘1': return render_template('usercenter1.html', **
阅读全文
摘要:authorbase: author1: author2: author3: 效果:
阅读全文
摘要:1.个人中心的页面布局(html文件及相应的样式文件) 2.定义视图函数def usercenter(user_id): 3.向前端页面传递参数 4.页面显示相应数据 发布的全部问答 发布的全部评论 个人信息 5.各个页面链接到个人中心 主PY文件: HTML文件(authorbase): HTML
阅读全文
摘要:定义评论的视图函数@app.route('/comment/',methods=['POST'])def comment():读取前端页面数据,保存到数据库中 用<input type="hidden" 方法获取前端的"question_id" 显示评论次数 要求评论前登录 尝试实现详情页面下的评论
阅读全文
摘要:建立评论的对象关系映射: class Comment(db.Model): __tablename__='comment' 尝试实现发布评论。
阅读全文
摘要:首页列表显示全部问答: PY文件: HTML: 完成问答详情页布局: 在首页点击问答标题,链接到相应详情页。 HTML: 效果图:
阅读全文

浙公网安备 33010602011771号