会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
L文斌
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
下一页
2017年12月8日
完成评论功能
摘要: py文件: fabuview.html:
阅读全文
posted @ 2017-12-08 09:38 L文斌
阅读(149)
评论(0)
推荐(0)
编辑
2017年12月5日
从首页问答标题到问答详情页
摘要: 主py: from flask import Flask, render_template, request, redirect, url_for, session from flask_sqlalchemy import SQLAlchemy import config from functool
阅读全文
posted @ 2017-12-05 09:06 L文斌
阅读(252)
评论(0)
推荐(0)
编辑
2017年12月1日
首页列表显示全部问答,完成问答详情页布局。
摘要: py文件: from flask import Flask, render_template, request, redirect, url_for, session from flask_sqlalchemy import SQLAlchemy import config from functoo
阅读全文
posted @ 2017-12-01 16:44 L文斌
阅读(479)
评论(0)
推荐(0)
编辑
2017年11月29日
制作首页的显示列表。
摘要: 1. 在首页添加显示问答的列表,并定义好相应的样式。 无序列表 <ul > <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ul> 2. 用字典向index.html传递参数。 daohang.html
阅读全文
posted @ 2017-11-29 15:56 L文斌
阅读(180)
评论(0)
推荐(0)
编辑
2017年11月28日
发布功能完成。
摘要: 编写要求登录的装饰器 from functools import wraps def loginFirst(func): #参数是函数 @wraps(func) def wrapper(*args, ** kwargs): #定义个函数将其返回 #要求登录 return func(*args, **
阅读全文
posted @ 2017-11-28 12:10 L文斌
阅读(179)
评论(0)
推荐(0)
编辑
2017年11月24日
登录之后更新导航
摘要: 主py: config.py: daohang.html:
阅读全文
posted @ 2017-11-24 09:43 L文斌
阅读(177)
评论(0)
推荐(0)
编辑
2017年11月21日
完成登录功能,用session记住用户名
摘要: 登录功能完成: session: py文件: config.py: denglu.js: denglu.html: 运行结果:
阅读全文
posted @ 2017-11-21 15:06 L文斌
阅读(615)
评论(0)
推荐(0)
编辑
2017年11月17日
完成注册功能
摘要: js文件: onclick函数return True时才提交表单,return False时不提交表单。 html文件: <form>中设置 action和method="post" <input> 中设置 name 主py文件中: from flask import request, redire
阅读全文
posted @ 2017-11-17 16:31 L文斌
阅读(197)
评论(0)
推荐(0)
编辑
2017年11月15日
通过用户模型,对数据库进行增删改查操作。
摘要: 增加:db.session.add(user)db.session.commit() 查询:User.query.filter(User.username == 'mis1114').first() 修改:user.password = '111111'db.session.commit() 删除:db.session.delete(user)db.session.commit() from f...
阅读全文
posted @ 2017-11-15 15:46 L文斌
阅读(201)
评论(0)
推荐(0)
编辑
2017年11月14日
连接mysql数据库,创建用户模型
摘要: 安装与配置python3.6+flask+mysql数据库 下载安装MySQL数据库 下载安装MySQL-python 中间件 pip install flask-sqlalchemy (Python的ORM框架SQLAlchemy) mysql创建数据库 数据库配置信息config.py 建立my
阅读全文
posted @ 2017-11-14 09:52 L文斌
阅读(171)
评论(0)
推荐(0)
编辑
上一页
1
2
3
4
5
下一页