https://github.com/konglx90/flask-web-learn
Study for book Flask Web develop
https://github.com/konglx90/flask-web-learn
flask
Last synced: 2 months ago
JSON representation
Study for book Flask Web develop
- Host: GitHub
- URL: https://github.com/konglx90/flask-web-learn
- Owner: konglx90
- Created: 2016-04-27T08:52:20.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-12-29T07:48:52.000Z (over 8 years ago)
- Last Synced: 2025-06-30T22:05:45.169Z (about 1 year ago)
- Topics: flask
- Language: Python
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## 《Flask Web开发》前六章的代码
### Run...
创建虚拟环境`virtualenv env`
激活虚拟环境`source env/bin/activate`
安装需要的库`pip install -r requirements.txt`
迁移数据库`python hello.py db migrate`
### Good parts
- 坚持使用虚拟环境
+ virtualenv env
+ source env/bin/activate
+ deactivate
- 熟悉Git
+ git clone
+ git pull
+ git fetch
+ git merge
+ git push
+ git branch
+ git checkout
- 采用装饰器实现理由控制`@app.route('/', method=['GET', 'POST'])`
- 上下文全局变量
+ current_app 程序上下文
+ g 程序上下文
+ request 请求上下文
+ session 请求上下文
- 使用Jinja2模板引擎
- 优雅的Flash消息
- 采用关系型数据库sqlite
- Flask 扩展
+ flask-script
+ flask-bootstrap
+ flask-moment
+ flask-wtf
+ flask-SQLAlchemy
+ flask-migrate