Django的介绍与配置
-
web三大框架
- Django :重量级
- Flask: 轻量级
- Tornado :轻量级
-
wsgi协议
def application(environ, start_response): start_response('200 OK', [('Content-Type', 'text/html')]) return 'hello'
-
服务器程序
- gunicorn :绿色独角兽
- uwigi
-
apt update 提示签名无效
gpg --keyserver pgpkeys.mit.edu --recv-key 自己的签名 gpg -a --export 自己的签名 | sudo apt-key add
-
安装virtualenv
pip install virtualenv
-
安装virtualenvwrapper
pip install virtualenvwrapper
-
https://blog.csdn.net/kan2016/article/details/81639461
配置虚拟环境
1. cd /home/demo 2. mkdir .virtualenvs 3. sudo vi .bashrc 加内容: export WORKON_HOME=$HOME/.virtualenvs source /home/demo/.local/bin/virtualenvwrapper.sh 4. source .bashrc http://www.leesven.com/2258.html # 提示/usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh: No such file or directory.
-
web开发模式
- 前后端分离
- 前后端不分离