摘要:
一.个人学期总结 从一开始接触的是turtle库绘制图形,在没有接触基本语法的情况下,会因为基础不扎实而学起来吃力,turtle库的学习,练习if条件、for循环、定义函数的代码,激发了我们对python的学习兴趣的热情,逐渐的,在对库的使用中熟悉了python的语法,有html基础加上Bootst
阅读全文
posted @ 2018-01-07 19:55
094吴嘉绿
阅读(351)
推荐(0)
摘要:
阅读教材,思考并回答以下问题: 1.DDS和IDDS的组成。 答:DDS(决策支持系统)由决策支持系统的系统结构,人机对话子系统,数据库子系统,模型库子系统,方法库子系统组成。 IDDS(智能决策支持系统)由只能人机接口,问题处理系统,知识库子系统与推理机组成。 2.电子商务系统的结构。 答:电子商
阅读全文
posted @ 2018-01-04 14:54
094吴嘉绿
阅读(167)
推荐(0)
摘要:
模型分离--让代码更方便管理 新建models.py,将模型定义全部放到这个独立的文件中。 新建exts.py,将db = SQLAlchemy()的定义放到这个独立的文件中。 models.py和主py文件,都从exts.py中导入db。 在主py文件中,对db进行始化,db.init_app(a
阅读全文
posted @ 2017-12-26 12:06
094吴嘉绿
阅读(137)
推荐(0)
摘要:
1.更新User对象,设置对内的_password class User(db.Model): __tablename__ = 'user' _password = db.Column(db.String(200), nullable=False) #内部使用 2.编写对外的password fro
阅读全文
posted @ 2017-12-22 11:50
094吴嘉绿
阅读(136)
推荐(0)
摘要:
示例: Lobby.query.filter( or_( and_( Lobby.id == Team.lobby_id, LobbyPlayer.team_id == Team.id, LobbyPlayer.player_id == player.steamid ), and_( Lobby.i
阅读全文
posted @ 2017-12-20 16:09
094吴嘉绿
阅读(155)
推荐(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-19 16:32
094吴嘉绿
阅读(125)
推荐(0)
摘要:
1.新页面userbase.html,用<ul ><li role="presentation"> 实现标签页导航。<ul class="nav nav-tabs"> <li role="presentation"><a href="#">Home</a></li> <li role="presen
阅读全文
posted @ 2017-12-15 11:54
094吴嘉绿
阅读(129)
推荐(0)
摘要:
1.显示所有评论{% for foo in ques.comments %} 2.所有评论排序uquestion = db.relationship('Question', backref=db.backref('comments', order_by=creat_time.desc)) 3.显示评
阅读全文
posted @ 2017-12-13 20:28
094吴嘉绿
阅读(390)
推荐(0)
摘要:
1.定义评论的视图函数 @app.route('/comment/',methods=['POST'])def comment():读取前端页面数据,保存到数据库中 @app.route('/comment/',methods=['POST']) @loginFirst def comment():
阅读全文
posted @ 2017-12-08 11:32
094吴嘉绿
阅读(74)
推荐(0)
摘要:
1.主PY文件写视图函数,带id参数。 @app.route('/detail/<question_id>')def detail(question_id): quest = return render_template('detail.html', ques = quest) 2.首页标题的标签做
阅读全文
posted @ 2017-12-07 11:41
094吴嘉绿
阅读(116)
推荐(0)